MySQL Forums
Forum List  »  Backup

Re: Restore backup leaves one database with no access
Posted by: marc fromm
Date: November 19, 2014 01:38PM

I did some testing. I backed up the live server using the command.
sudo mysqldump -u root -p --all-databases --add-drop-table | gzip > alldbs2.sql.gz

I then restored the backup on the dev server using the command.
sudo mysql -u root -p < alldbs.sql
I had no access issues.

I then restored the same backup on the same dev server using the command.
sudo mysql -u root -p -S /var/lib/mysql/mysql.sock < alldbs.sql
Again, no access issues.

Also this phpMyAdmin problem did not happen as well.
In phpMyAdmin if I select any of the databases and access the privileges information, all the databases report "Unkown column ‘Event_priv’ in ‘field list’"

The only thing not in this test scenario is my script that creates the backup using the mysql.sock as shown again here.
#!/bin/bash
backup_dir="/xxx/xxx/xxx/xxx"
timeslot=`date +%m-%d-%Y_%H-%M`
mysqldump -u root -p######## -S /var/lib/mysql/mysql.sock -A | gzip > "$backup_dir/alldbs-$timeslot.gz"

Can the script be the issue or using mysql.sock to create the backup be doing something to cause the problem? It seems it must be based on this test.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Restore backup leaves one database with no access
1623
November 19, 2014 01:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.