用cmd给数据库用户授权时出错 ERROR 1064(42000) 5
mysql>mysqlGRANTALLPRIVILEGESON*.*TO'用户名'@'%'IDENTIFIEDBY'密码中有@符'WITHGRANTOPTION;ERRO...
mysql> mysql GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '密码中有@符' WITH GRANT OPTION;
ERROR 1064 (42000):check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql GRANT ALL PRIVILEGES ON *.* TO '……'@'%' IDENTIFIED BY '……'' at line 1 展开
ERROR 1064 (42000):check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql GRANT ALL PRIVILEGES ON *.* TO '……'@'%' IDENTIFIED BY '……'' at line 1 展开
1个回答
2018-09-04 · 知道合伙人互联网行家
关注
展开全部
你好,你是MYSQL数据库,备份命令不是这样,应该是:
123mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql直接将MySQL数据库压缩备份mysqldump -hhostname -uusername -ppassword databasename | gzip > backupfile.sql.gz备份MySQL数据库某个(些)表mysqldump -hhostname -uusername -ppassword databasename specific_table1 specific_table2 > backupfile.sql同时备份多个MySQL数据库
123mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql直接将MySQL数据库压缩备份mysqldump -hhostname -uusername -ppassword databasename | gzip > backupfile.sql.gz备份MySQL数据库某个(些)表mysqldump -hhostname -uusername -ppassword databasename specific_table1 specific_table2 > backupfile.sql同时备份多个MySQL数据库
追问
你好,谢谢回答。这不是备份命令哦,我在登录数据库时遇到SQL#1130错误,在网上找到解决方法是授权,让用户可以在任何ip上登录数据库。然后出现如上错误,可以帮我解释为什么会出现上述错误吗?感激不尽
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询