mysql help

gaz0r

Verified User
Joined
Aug 27, 2004
Messages
36
Right mny server was corrupted and had to be formatted again... so they backed up the whole hard drive...

now i need to find mysql databases from the backup to restore them, where does direct admin store them ?
 
gaz0r said:
Right mny server was corrupted and had to be formatted again... so they backed up the whole hard drive...

now i need to find mysql databases from the backup to restore them, where does direct admin store them ?
I'd suggest you ask whoever backed up your hard drive and then reformatted; if they left it on the drive and reformatted the drive it would have been deleted by the reformat.

Jeff
 
the whole old hard drive was backed up so it wasnt a problem, its just finding the databases where direct admin has stored them
 
Right i have found the folder but its in loads of little files

cpg11d_albums.frm cpg11d_comments.frm cpg11d_usergroups.frm
cpg11d_albums.MYD cpg11d_comments.MYD cpg11d_usergroups.MYD
cpg11d_albums.MYI cpg11d_comments.MYI cpg11d_usergroups.MYI
cpg11d_banned.frm cpg11d_config.frm cpg11d_users.frm
cpg11d_banned.MYD cpg11d_config.MYD cpg11d_users.MYD
cpg11d_banned.MYI cpg11d_config.MYI cpg11d_users.MYI
cpg11d_categories.frm cpg11d_pictures.frm cpg11d_votes.frm
cpg11d_categories.MYD cpg11d_pictures.MYD cpg11d_votes.MYD
cpg11d_categories.MYI cpg11d_pictures.MYI cpg11d_votes.MYI



how do i restore this back to the new databases :confused:
 
This might work:

Create the user and the database first.

The username must be cpg11d and the database must be created as albums.

Then restore these files to:

/var/lib/mysql/cpg11d_albums/

which should have been created when you created the database.

The files should be owned by mysql:mysql, and should all be chmoded 660.

Jeff
 
jlasman

do you fancy having a go at connecting to my server and seeing if you can do it?
 
If I read this correctly you have several databases

cpg11d_albums
cpg11d_comments
cpg11d_usergroups
cpg11d_banned
cpg11d_config
cpg11d_users
cpg11d_categories
cpg11d_pictures
cpg11d_votes

Do the following:
1) In DirectAdmin create a user called cpg11d
2) In DirectAdmin log into the user cpg11d
3) In DirectAdmin create all the above databases choosing usernames and passwords as you go along.
4) Log into your server using SSH as root
5) type this (find -name "cpg11d_albums") on the commandline.
6) You should now know where your databases are located /var/lib/mysql or some other path. Go to that directory, type "ls -l" (without the "") and you should see a list of your databases.
7) copy the corresponding files to each directory (cpg11d_album* goed into the cpg11d_album directory)
8) type "chown -R mysql:mysql *" (without the "")
9) go into each individual database directory and type "chmod 660 *" (without the "")
10) you should be able to access the databases using the assigned (in step 3) usernames and passwords.

Regards,
Onno Vrijburg
 
gaz0r said:
do you fancy having a go at connecting to my server and seeing if you can do it?
I believe Onno gave you some very good suggestions as to how you could do this yourself.

We'd be very happy to log into your server and do the work, but we're specifically in the business of server administration, and wedo charge for server administration work.

Please contact me offline if you'd rather have us work on your server; my contact information is below in my sig. Note that I do not read private messages nearly as often as I read email; email is a much better way to reach me.

Jeff
 
Back
Top