How to change default MySQL directory
Originally it will be located at /var/lib/mysql
Say you want to change it to /home/myApps/mysql
First if the mysql is running stop it: sudo /etc/init.d/mysql stop
and stop the server too: sudo/etc/init.d/apache2 stop
Go to /etc/mysql/my.cnf and edit:
datadir = /var/lib/mysql to datadir = /home/myApps/mysql
Copy files from existing path to the new path
cp -R /var/lib/mysql* /home/myApp/mysql
Grant ownership to new directory for mysql
sudo chown -R mysql:mysql /home/myApp/mysql
then start up your server and mysql – voila.
Upgrade mysql version from 5.5 to 5.6
install composer and make it globally accessible
Mac Numbers document to Excel
Configuring PHP + MySQL + Apache on Amazon EC2 Step by Step
Access MySQL from Host being on Vagrant
Rahul
Hi,
Great. Nice article thanks for sharing.
gullele
Thanks Rahul
DBAWork
Nice blog, thank you for sharing