Hi All
First up I'm not an experienced Linux user, I can follow step by step instructions and muddle my way through simple stuff. My first foray into understanding MySQL was last night
I have rebuilt a server that had some issues and manually moved over all users and data (I didn't want to use the affa method to fully restore a SME server as there were some errors I didn't want migrated in the /home/e-smith/...) This is all up and running smoothly for the past week.
The last step is moving our small office intranet. I thought this would be as easy as setting up the correct database and user and copying over the intranet/html directory. alas no I have learned through google that the contents of the site are stored in the MySQL database on the old server.
I have googled how to move this there seems to be two methods, one to create a dump and copy this across and then import it.
mysqldump -u root -p --opt [database name] > [database name].sql
scp [database name].sql [username]@[servername]:path/to/database/
mysql -u root -p newdatabase < /path/to/newdatabase.sql
In the example above what would "path/to/database" be? is it /var/lib/"database"
And another says simply copy /var/lib/"database" to the new server then create a database on the new server of the correct name (wordpress in my case) and add the users.
I really don't want to muck this up as the new server is error free and I don't want to do anything stupid. Can anyone give me some guidance on this as the best (correct) method I just don't know enough at present about MySQL to be confident enough to hit enter. Both servers are running and on the same internal network so I have been using rsync to move everything across rather than scp.
Some help would be appreciated
Cheers
Allan