首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql有关问题1449

2012-09-04 
mysql问题1449在linux下,用mysql的导出语句:mysqldump -u root -pPasswd table /home/lsf/test.sql出现了

mysql问题1449
在linux下,用mysql的导出语句:

mysqldump -u root -pPasswd table >/home/lsf/test.sql

出现了

Got error: 1449: The user specified as a definer ('root'@'') does not exist when using LOCK TABLES

这种令人作呕的错误,windows下从没碰到过。

搞了半天,总算弄出来了。。

只要给root用户再添加一个对全部host都有可以访问的权限

操作如下:

登陆mysql

mysql -u root -pPasswd

mysql >grant all privileges on *.* to root@"%" identified by "Passwd"

mysql >flush privileges;

==============

END~! KO.

再进行导出就可以执行了。
注:SQL语句,grent all privileges on *.* to monty@localhot identified by'something' with grant option
这是SQL的授权语句
给在本地通过'something'密码登录的monty用户在所有数据库上的所有权限,并且可以将自己的权限授予他人。
all privileges :所有权限
on *.*  :所有的数据库
monty@localhot identified by'something' :用户名monty,本地登录localhost,密码something
with grant option:可以将自己的权限授予他人

热点排行