grepmaster
grepmaster

Reputation: 54

cannot create a new user on mysql 5.1.73

This does not seem to work

mysql> SET PASSWORD FOR juser201411@localhost= PASSWORD(".6,y:C2a");

ERROR 1133 (42000): Can't find any matching row in the user table

After that I tried manually adding from 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

Upvotes: 1

Views: 2115

Answers (2)

Andrew Bennett
Andrew Bennett

Reputation: 940

For me I had put the line into a txt editor to fill it out and some of my single quotes had gotten converted to smart quotes...hard to see, but obvious once you do(!)

Upvotes: 0

Jens
Jens

Reputation: 69515

Try to use the CREATE USER syntax. For more information see MySQL doc

CREATE USER 'juser201411'@'localhost' IDENTIFIED BY PASSWORD '.6,y:C2a';

Upvotes: 1

Related Questions