MySQL

Backup and Restore MySQL from the command line (CLI)

I use MySQL.  I like MySQL... but I don't trust MySQL. 

Actually, I don't trust anything computer-based, its nothing against MySQL at all... so I like to back up my databases from time to time.

Now because I have my own server, I can use the command line to do most of my management, which I prefer,  but try as I might the backup and restore commands escape me every time I go to use them... so here they are, just for me (and you too)

to back up:

mysqldump -u username -p databasename > backupfile.sql

To restore:

Fatal error (maximum execution time exceeded) when using Drupal on WAMP

Have you had this error while developing a Drupal site on a WAMP server?  Its common, and relatively easy to fix.

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\<mysite>\includes\database.mysqli.inc on line 108