Problem moving database directories to a new server
MySQL broke on my old server so I copied all the directories in /var/lib/mysql to the same location on my new server and recursively set owner and group to mysql with permissions of 0755 and restarted mysql. I expected to see the databases and users when I logged into the corresponding accounts via cpanel but they aren't there. Where did I go wrong?
-
Hi Kray, Did you try mysqldump ? At your old server, perform the following command # mysqldump --all-databases > all-databases-backup.sql This shouldn't generate any error. The above command just takes all your databases in a SQL Format and saves it in a file name all-databases-backup.sql Once finished, rsync or scp to your new server at any location and restore the database to your new server. # mysql < all-databases-backup.sql I recommend doing these in the screen mode if you contain more databases in your server. [quote="kray, post: 1714822">MySQL broke on my old server so I copied all the directories in /var/lib/mysql to the same location on my new server
What errors do you get in your /var/lib/mysql/ file at your old server ?0 -
Hello, Please try running /scripts/update_db_cache and see if the accounts re-appear in cPanel 0
Please sign in to leave a comment.
Comments
2 comments