Error 2002 after changing datadir in mysql.cnf - Raspberry Pi Forums
hello, new raspberry , linux.
bought pi2 piface digital 2, no problems raspbian , mysql + php5 installs.
tried move newly created database nas (buffalo terastation); found lots of infos on net, mounted ok destination folder, copied db, , changed "datadir" in /etc/mysql/my.cnf file.
but: no way restart mysql, consistently following "error 2002 (hy000): can't connect local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)".
fooled around lot different parameters, changed "bind-address" 0.0.0.0 or pi2 ip address, socket location (also in debian.cnf) etc.
tried install apparmor, problem still there. reversible though, return "datadir = /var/lib/mysql" starts working again.
way, "$ sudo service mysql restart" works, "$ sudo /etc/init.d/mysql stop" consistently fails.
appreciate help, issue drives me crazy !
bought pi2 piface digital 2, no problems raspbian , mysql + php5 installs.
tried move newly created database nas (buffalo terastation); found lots of infos on net, mounted ok destination folder, copied db, , changed "datadir" in /etc/mysql/my.cnf file.
but: no way restart mysql, consistently following "error 2002 (hy000): can't connect local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)".
fooled around lot different parameters, changed "bind-address" 0.0.0.0 or pi2 ip address, socket location (also in debian.cnf) etc.
tried install apparmor, problem still there. reversible though, return "datadir = /var/lib/mysql" starts working again.
way, "$ sudo service mysql restart" works, "$ sudo /etc/init.d/mysql stop" consistently fails.
appreciate help, issue drives me crazy !
you need move /var/mysql (including subdirectories) new device update /etc/mysql/my.cnf reflect new location. there's lots of meta-data tables created when start running mysql first time.
raspberrypi
Comments
Post a Comment