1
这段代码是从学习MySQL和MariaDB的书:MySQL的:试图为root设置一个密码,错误SQL语法
mysql -u root -p -e "SET PASSWORD FOR 'root'@'127.0.0.1' PASSWORD('new_pwd');"
而且我得到这个错误:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
e right syntax to use near 'PASSWORD('new_pwd')' at line 1
这本书是否正确?这个语法不是旧的吗?有什么问题?
谢谢!现在它工作正常。 – 9Algorithm
很酷。我很高兴它的工作。另外,请接受我的答案作为解决方案:) –