Quote:
Originally Posted by gentoo_user
hii all
yesterday , i copied the configuration files of mysql in pc to another pc ,
i copyied /etc/mysql/*
and /var/lib/mysql/*
because i needed to theses configuration in the other pc.
when the copy finish , i try to enter the mysql , then messege display :
"ERROR 2002 (HY000) : CanT connect to local MySql server through socket '/var/run/mysqld/mysql.sock' (111)"
so , what is the solution ,
|
This is most probably because mysql server is not started.
To copy over a mysql installation in the way you're trying, this is the good sequence (pc1 is the one where mysql is installed, pc2 the one where you want to copy):
1- install on pc2 the
same version of mysql (unsless you're looking for trouble...) that is on pc1 (upgrade mysql on pc1 if you need to and make sure everything runs smoothly)
2- stop the mysql servers on pc1 and on pc2
3- copy the files over as you just did
4- start mysql server on pc2 and test
There are other ways to copy databases from one server to an other. Using mysqldump might be easier and will work (to some extent) with different configuration options and different version of mysql.
Good luck.