LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copying MySQL and Email Accounts (https://www.linuxquestions.org/questions/linux-newbie-8/copying-mysql-and-email-accounts-283181/)

imangm 01-28-2005 02:18 AM

Copying MySQL and Email Accounts
 
Hi,

I have a linux server. My hosting company sent an email to me and told me they have do some maintenances on my server. They seted up a new drive for me and copied my old information in /mnt directory.

I have to create all websites on this server. I'm creating them but I don't know how to copy MySQL and Email Accounts from my backup to the new drive.

Any ideas?

bathory 01-28-2005 02:29 AM

For mysql you need to copy the directroy "data" or "var" (depending if you installed mysql fron binary or source) which contains you databases.
For your users there is a script named newusers (man newusers) which will help you recreate their accounts.

Good luck

imangm 01-28-2005 02:39 AM

Hi,

thank you for your help.
Does MySQL work just like the past if I copy /data and /var directories to new drive? I mean If I copy these directories, do all databases and databases users and privileges restore?

Thanks

bathory 01-28-2005 05:13 AM

Mind that you must copy the directory containing the databases which is named data or var according to your installation. There must be only one of those directories (I guess it is data since it's more common installing from binary). Copy it under your newlly installed mysql directory (better stop mysqld before copy) and pay attention to the permissions. The databases are owned my user/group mysql/mysql

Regards


All times are GMT -5. The time now is 10:21 PM.