手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

mysqldump 1449错误解决办法

[日期:2012-05-26] 来源:Linux社区  作者:alsww [字体:大 中 小]

研究MySQL主从复制,在数据库导入导出的过程中,主数据据导出导入没问题,但是在从库上导入就报错mysqldump 1449 这个错误,之后网上查找了一下方案,成功解决。

现将操作步骤贴出,以便大家学习交流:

[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

解决办法:

mysql>grant all privileges on xxxerp.* to 'xxxerp'@'%' identified by '123456';

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--r-- 1 root root 2183168822 Oct 29 01:42 xxx_erp_db03_test01.sql

-rw-r--r-- 1 root root  186133946 Aug 16 14:18 all.tar.gz

The end

linux
相关资讯       MySQL数据库教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款