Programming, often referred to as coding, is the process of creating instructions that tell computers how to perform tasks. It’s akin to writing a recipe for a computer to follow. Just like a recipe can instruct you to bake a cake, a program instructs a computer to perform tasks like calculating numbers, storing information, or […]
How to dump a MySQL database to another server in Unix
The following line will allow you to dump a MySQL database from the current machine to another machine, for as long as you have access to the dd command on the remote machine: mysqldump -u USERNAME-HERE -p’PASSWORD-HERE’ DB-NAME-HERE | ssh [email protected] “dd of=/mysql/$(date +’%d-%m-%y’)”
Check If MySQL Table Exists
How to check if a table exists in the current MySQL database, through running a simple query.
Search all stored procedures for keyword
This SQL query will search for a specific keyword in all the stored procedures available.
Search and replace table field contents
The query below will replace all occurences of “Bob Loblaw Law Blog” found in the field “BlogName” field of the Blogs table. All instances of the string are being replaced, and the search is case sensitive. The function is also multi-byte safe.
How to reset your MySQL root password under Windows
In case you forgot the root password for your MySQL database server running under Microsoft Windows, you can still access your database and even reset your password using the command prompt. However, first you should check your my.cnf file where your password is stored. If you are using a new version of MySQL Server, such […]