![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to restore a database in another computer/server that was dumped as: mysqldump -u $USER -p${KEY} --master-data=2 --all-databases > dump_file But the restore procedure complains that one user (that has all grants in all databases) does not exist. ERROR 1449 (HY000) at line 28978: The user specified as a definer ('px2'@'%') does not exist |
|
Clearly, since I ran the mysql_install_db and mysql_secure_installation, the user 'px2'@'%' is not in the new server. |
#3
| |||
| |||
|
|
luislupeXXX (AT) gmailXXX (DOT) com (L M) wrote: I'm trying to restore a database in another computer/server that was dumped as: mysqldump -u $USER -p${KEY} --master-data=2 --all-databases > dump_file But the restore procedure complains that one user (that has all grants in all databases) does not exist. ERROR 1449 (HY000) at line 28978: The user specified as a definer ('px2'@'%') does not exist It should be created when you load the dump. But: $mysqldump --help ... --flush-privileges Emit a FLUSH PRIVILEGES statement after dumping the mysql database. This option should be used any time the dump contains the mysql database and any other database that depends on the data in the mysql database for proper restore. You need this. Whitout this option the loaded (from the dump) MySQL accounts won't be enabled. As a workaround you can dump the `mysql` database separately from the other databases (use the --databases option). Then load the `mysql` database first and run FLUSH PRIVILEGES manually. Then load the other dump. Thank you very much. |
![]() |
| Thread Tools | |
| Display Modes | |
| |