mysql5.7导入数据的权限问题
生活随笔
收集整理的這篇文章主要介紹了
mysql5.7导入数据的权限问题
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
mysql5.7中創(chuàng)建用戶時(shí)雖然使用 grant all on xxx.* to test@"localhost" 但是使用mysql命令導(dǎo)入時(shí),還是會(huì)出錯(cuò) mysql --default-character-set=utf8 -utest -p testdb < testdb20180103.sql 會(huì)出現(xiàn)下面錯(cuò)誤:
mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
解決辦法是: 用root登錄mysql 查詢super權(quán)限
select user,Super_priv from mysql.user;
賦予super權(quán)限
update mysql.user set Super_priv='Y' where user='test';刷新權(quán)限
flush privileges;
這時(shí)就可以導(dǎo)入sql文件了
導(dǎo)入完成后收回super權(quán)限
update mysql.user set Super_priv='N' where user='test'; flush privileges;
總結(jié)
以上是生活随笔為你收集整理的mysql5.7导入数据的权限问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ArcEngine中IFeatureCl
- 下一篇: 智能拨号的联系人快速模糊匹配的算法