PDA

View Full Version : msqldump help


Tony
Wed 17th Mar '04, 7:08pm
I'm tring to backup my database and having a hard with it. I'm tring to backup thru ssh/telnet.

here is an example of what I type

mysqldump -u xxx -p xxx xxxxxxxxx > home/xxxx/backup/dump.sql

After I type that in it ask me for my password. how come? What password is it looking for? I think I tried every password I have.

Steve Machol
Wed 17th Mar '04, 7:54pm
That's normal. It's asking for your database user password - the one in config.php.

Tony
Wed 17th Mar '04, 8:08pm
That's normal. It's asking for your database user password - the one in config.php.That is the strange part. When I type that in this error shows up
1044 access denied for user. It should be the same password as above right?

Steve Machol
Wed 17th Mar '04, 8:11pm
This means either the db user, the password or the db name is wrong OR that db user does not have permission to access that database. If you use the exact entires in your working config.php file, then this should work.

Tony
Wed 17th Mar '04, 8:19pm
everything is the same in the config.php file.
I copied this from the php file, does that have anything to do with it?

// use persistant connections to the database
// 0 = don't use
// 1 = use
$usepconnect = 0;

// which users are allowed to view the admin log
// separate each userid with a comma
$canviewadminlog = "1";

// which users are allowed to prune the admin log
// separate each userid with a comma
$canpruneadminlog = "";

?>

Steve Machol
Wed 17th Mar '04, 8:21pm
No, those values have nothing to do with the error you are getting. I'm afraid the only causes for that specific error are what I posted above.

Floris
Wed 17th Mar '04, 8:26pm
config.php example (should be the same for both version 2 and 3 of vbulletin)
// ****** DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$dbusername = 'userX';
$dbpassword = 'passY';
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'dbaseZ';



Now the command in your shell should be something like this:
mysqldump -u userX -p dbaseZ > home/xxxx/backup/dump.sql
it will then prompt for the pass, enter:
passY

If it still errors denied to you, what host address is set in the config.php (an ip or localhost?) If the host address is not localhost, you can use the -h hostaddresshere to tell mysqldump to connect. If it is localhost, then contact your hosting provider and ask why you don't have access to connect to your mysql database from the shell prompt and provide them the command you tried.

Tony
Wed 17th Mar '04, 8:40pm
Oh sweet!! who's better than you guys. 29,200kb if the file size
You know how long i have been messing with this.

Step one is done for vb 3

Oh is it ok to use this backup on my testsite for testing the install of vb3

Floris
Wed 17th Mar '04, 8:58pm
If you have a valid licence, you may set up an additional test forum in order to test code, template and database modifications. To make this clear to us and our licence verification procedures, place it in a directory called 'testvb' and be sure to password protect it. It must not be accessible by the general public.

Quoted from: http://www.vbulletin.com/license.html

Tony
Wed 17th Mar '04, 9:03pm
ok great. I'm vaild until may. I already have a test site. I wanted to make sure it was ok to use that data base there.

Floris
Wed 17th Mar '04, 9:21pm
Well, if it doesn't reply to you, and only shows the prompt again - then it has no errors and has completed.

You could check at the end of the file and see if it ends with an insert. If it ends with timeout error, then the .sql dump is not complete.

Tony
Wed 17th Mar '04, 9:30pm
How about the restore? I can't find where it put that and if it did. I had no errors and it went back to the comand prompt pretty fast.
I need to edit the config file

Tony
Wed 17th Mar '04, 9:35pm
OMG never mind I got it! Thanks for the help!!How about the restore? I can't find where it put that and if it did. I had no errors and it went back to the comand prompt pretty fast.
I need to edit the config file

Floris
Wed 17th Mar '04, 9:41pm
:)

Glad you got it.

you can check with phpmyadmin to see if the database is populated.

Tony
Wed 17th Mar '04, 9:49pm
yes it is. it is on my testsite. Man backing up the databas is pretty easy. I should do that more often. That was my first in two years.

Now that is done. Onto vb3:D
:)

Glad you got it.

you can check with phpmyadmin to see if the database is populated.