mysqldump: Got error: 1449: The user specified as a definer ('xxx'@'%') does not exist when using LOCK TABLES
开发同学说在测试环境使用mysqldump导出数据的时候遇到以下错误:
# mysqldump -uroot -p --all-databases --routines --events --triggers --no-data > /tmp/test.sql;
Enter password:
mysqldump: Got error: 1449: The user specified as a definer ('xxx'@'%') does not exist when using LOCK TABLES
查看数据库中的用户,的确不存在:
select user,host from mysql.user;
因为库中的数据是从别的地方导入的。导入后就删除了上面的用户'xxx'@'%'。但是库中有一部分views是通过该用户创建的。
现在需要找出这些视图,并修改他们的定义者信息:
select concat("alter definer=`root`@`%` view ", table_name, " as ", view_definition, ";")
from information_schema.views
where table_schema='<你的数据库名>';
执行上面查询出语句,到你的数据库中执行即可!
mysqldump: Got error: 1449: The user specified as a definer ('xxx'@'%') does not exist when using LOCK TABLES的更多相关文章
- mysqldump: Got error: 1449: The user specified as a definer ('user'@'%') does not exist when using LOCK TABLES
报错:一个库用mysqldump -u -p --opt --force -e --max_allowed_packet= --net_buffer_length= --databases备份时报错如 ...
- Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TAB
在linux下,用mysql的导出语句: mysqldump -hlocalhost -uroot -pPasswd table >/home/ftp/test.sql 出现了 mysqldum ...
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: Got error: 1449: The user specified as a definer ('fk_system'@'localhost') does not exist when using LOCK TABLES
在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...
- 1449 - The user specified as a definer('xxx'@'%') does not exist
指定的用户不存在,创建相应的账户即可,注意主机那里填的内容,我的这个是@'%'所以不用填任何内容.
- 错误代码: 1449 The user specified as a definer ('root'@'%') does not exist
1. 错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:call analyse_use('20150501','20150601 ...
- [Err] 1449 - The user specified as a definer ('student'@'%') does not exist
1.错误描述 [SQL]use student; 受影响的行: 0 时间: 0.001s [SQL] call alter_student('t_student','MODIFY COLUMN `we ...
- 1449 - The user specified as a definer ('test'@'%') does not exist
最近在做一个项目,由于服务器切换,所以需要将原有服务器的mysql数据表以及存储过程导入到另一个服务器的mysql数据库中.导入完成之后以为一切是那么的简单,却没有想到总还是出现了一些莫名其妙的问题. ...
- [Err] 1449 - The user specified as a definer ('rybhe'@'%') does not exist
转载: 最近在做一个项目,由于服务器切换,所以需要将原有服务器的mysql数据表以及存储过程导入到另一个服务器的mysql数据库中.导入完成之后以为一切是那么的简单,却没有想到总还是出现了一些莫名其妙 ...
- MySQL 导出数据库,出现 “mysqldump: Got error: 1146”
出现场景 在 cmd 导出数据库时: mysqldump -hlocalhost -uroot -p student_db > C:\student_db.sql 出现: mysqldump: ...
随机推荐
- python(写入excel操作-xlwt模块)
一.安装xlwt模块 pip install xlwt 二.excel写入操作 这种方式只能新增或者覆盖文件写入 import xlwt # 创建一个workbook 设置编码 workbook = ...
- ovirt平台新建kvm操作
登录后点击管理门户,随后计算-->虚拟机--> 新建 一般情况下需要操作的选项如下: 普通: 操作系统:linux 优化目标:服务器 描述:自定义 nic1:选择默认的网络 系统: 内存, ...
- IDEA中css文件包红色下划线
选中该文件,右键 -> Analyze -> Configure Current File Analysis... Highlighting Level置为None
- Hadoop跨集群迁移数据(整理版)
1. 什么是DistCp DistCp(分布式拷贝)是用于大规模集群内部和集群之间拷贝的工具.它使用Map/Reduce实现文件分发,错误处理和恢复,以及报告生成.它把文件和目录的列表作为map任务的 ...
- Ubuntu 14.04.2配置rsync
ubuntu系统自带rsync,首先配置/etc/default/rsync,启用daemon模式 修改/etc/rsyncd.conf配置文件 cat /etc/rsyncd.conf # samp ...
- 讲解Flume
Spark Streaming通过push模式和pull模式两种模式来集成Flume push模式:Spark Streaming端会启动一个基于Avro Socket Server的Receiver ...
- js去除数组中重复的数字
var arr = [2,1,4,3,2,4,2,3,4,2,6,5,5] var obj = {}; var arrNew = []; for(var i=arr.length-1;i>=0; ...
- Dubbo源码分析:Serialization
背景 顺序化逻缉处理! 类图 获取Serialization对象时序图 序列化
- [Web] About image: MozJPEG
Image is quite heavy in web traffic. it is about 53% whole web traffic. It is important to make sure ...
- learning java 重定向标准输入输出
output redirectionOut: public class RedirectOut { public static void main(String[] args) throws File ...