Select Page

Generate 4 digit random PIN number in MySQL

I recently came across a problem where I had to update hundreds of client records with a random 4 digit PIN code. After some research, I wrote the following SQL which did the trick. It will update all records on the table: table_name and set a random 4 digit PIN...

How do I restore a MySQL dump?

If you have an all-database MySQL dump, follow the instructions below to restore your SQL file with all database data & privileges. Please note that the following procedures require command line access and is assuming you are the administrator of the computer....

How to backup MySQL server?

Recently, I bought a new laptop and was challenged to move my development sites over. Copying files and sites is all pretty easy, however, if you do not backup your MySQL server correctly – you will face quite a hassle recreating all the databases and...