这似乎不起作用
mysql> SET PASSWORD FOR juser201411@localhost= PASSWORD(".6,y:C2a");
ERROR 1133 (42000): Can't find any matching row in the user table
之后我尝试从mysql.user
手动添加mysql> update mysql.user set password=('.6,y:C2a') where User='juser201411' and Host='localhost';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> select User from mysql.user;+------+
| User |
+------+
| root |
| root |
+------+
2 rows in set (0.00 sec)
centos 6.5 x64
答案 0 :(得分:1)
尝试使用CREATE USER
语法。有关详细信息,请参阅MySQL doc
CREATE USER 'juser201411'@'localhost' IDENTIFIED BY PASSWORD '.6,y:C2a';
答案 1 :(得分:0)
对我来说,我已经把这条线放到了一个txt编辑器中来填写它,我的一些单引号已经转换为智能引号......很难看到,但是很明显一旦你做(!)