Study mysql master-slave replication. During the Database Import and Export process, it is okay to export the master data, but the error mysqldump1449 is returned when importing the master data from the database.
Study mysql master-slave replication. During the Database Import and Export process, it is okay to export the master data, but the error mysqldump 1449 is returned when importing the data from the database.
Study mysql master-slave replication. During Database Import and Export, there is no problem with the export of master data, but the error mysqldump 1449 is returned when importing data from the database, then I searched for the solution on the Internet and solved it successfully.
Now we will post the operation steps for you to learn and exchange:
[Root @ localhost ~] #/Opt/mysql/bin/mysqldump -- opt xxx_erp> xxx_erp_db03_test01. SQL
Mysqldump: Got error: 1449: The user specified as a definer ('xxxerp '@' % ') does not exist when using LOCK TABLES
Solution:
Mysql> grant all privileges on xxxerp. * to 'xxxerp '@' % 'identified by '123 ';
Query OK, 0 rows affected (0.00 sec)
Mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
[Root @ localhost ~] #/Opt/mysql/bin/mysqldump -- opt xxx_erp> xxx_erp_db03_test01. SQL
[Root @ localhost ~] # Ll
Total 2320444
-Rw-r -- 1 root 2183168822 Oct 29 0:42 xxx_erp_db03_test01. SQL
-Rw-r -- 1 root 186133946 Aug 16 all.tar.gz
The end