3

MySQL change datadir, problem with mysqld.sock

view full story
linux-howto

http://askubuntu.com – I tried to change the database dirrectory, datadir, I did the following steps. My machine: Laptop Ubuntu 11.10 64-bit Install: sudo apt-get install mysql-server mysql-client All Ok, I can create databases, tables, all ok. Change the datadir: 1) $ /etc/init.d/mysql stop 2) $ cp -R -p /var/lib/mysql /new_path 3) $ rm /new_path (this only remove files unnecessary) 4) $ gedit /etc/mysql/my.cnf Change the "databir = var/lib/mysql" to the new path. 5) $ gedit /etc/apparmor.d/usr.sbin.mysqld Change the "/var/liv/mysql" to the new lines wit "/new_path/mysql" 6) $ /etc/init (HowTos)