can't connect to local mysql server through socket..................
hi everyone:
i am new member for this forum, i am doing copy data from virtualbox A centos machine to virtualbox B centos machine. first step i use mysqldump database xxx > xxx.sql than send to B machine by scp xxx.sql @B machine IP /root. but come to third step, the xxx.sql need import to B machine mysql database,the error occur again: # can't connect to local mysql server through socket 'opt/lampp/lampp/mysql/mysql.sock i really dun know how to solve it, use almost 3 hour cannot do solve it, but i use win scp check the folder, i found mysql.sock is no at the /opt/lampp/lampp/mysql/mysql.sock but at /opt/lampp/var/mysql/mysql.socp i dun know how to continue it, i hope those centos user help me to overcome the issue. thank you very much! centos version 5.5, xampp version 1.4 |
Before restore the database on your second machine, please confirm following
1. mysql up and running 2. database already created 3. mysql -u username -ppassword databasename < dump.sql |
Quote:
Alternatively copy the file from /opt/lampp/var/mysql/ to /opt/lampp/lampp/mysql/ and try restarting mysql and then importing the database. |
thanks you very much, the problem was solve,
answer is i cannot use mysql one word to create command i need type directory mysql to create command like /opt/lampp/bin/mysql -u root databasename < xxx.sql thank a lot everyone! |
All times are GMT -5. The time now is 09:48 PM. |