Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vms:webdev:mysql [2014/11/03 16:11]
admin [Have your MySQL Databases Stored on your Host Filesystem]
vms:webdev:mysql [2014/11/03 18:09] (current)
admin [Restart MySQL]
Line 88: Line 88:
 > sudo mount /​var/​lib/​mysql > sudo mount /​var/​lib/​mysql
 > cp -a /​var/​lib/​mysql.bak/​* /​var/​lib/​mysql/​ > cp -a /​var/​lib/​mysql.bak/​* /​var/​lib/​mysql/​
-> service mysql start 
 </​code>​ </​code>​
 +
 +==== Restart MySQL ====
 +
 +All should now be in place to have MySQL use our shared folder as physical database storage location.
 +<​code>​
 +> sudo service mysql start
 +</​code>​
 +
 +=== Delete backup files ===
 +
 +Now, if all is running well, we can get rid of the backup files we initially created. In case of necessity, those files are, in fact, still present on the virtual machine'​s hard disk, unmounting the shared folder would reveal them.
 +
 +<​code>​
 +> sudo rm -r /​var/​lib/​mysql.bak
 +</​code>  ​
 +
 +-----
 +===== Install MySQL Workbench =====
 +-----
 +
 +Even though your database files will, from now on, be stored on your host filesystem, you might find it easier to use an integrated tool to manage the different aspects of your MySQL configuration (i.e. mainly users and tables management). This could be done using [[http://​www.phpmyadmin.net|PhpMyAdmin]],​ that could be deployed inside a dedicated virtual host.
 +
 +Although, my personal advise is to use the more versatile [[http://​dev.mysql.com/​downloads/​tools/​workbench/​|MySQL Workbench]] application. The primary reason being that this one will allow you to manage not only your local development databases, but also your remote production servers, all from the same interface. Using ssh tunneling, you won't even have to allow external MySQL connections on your production machines.