randomorbit
June 23rd, 2008, 05:10 PM
Hi. I searched the forum and didn't see anything like this, so please forgive me if this was answered elsewhere. I have Ubuntu 8.04 server edition installed. I installed MySQL (version 5.0.51a-3ubuntu5.1), and it's running OK, except when I try to add users to MySQL, it gives me an access denied message. I can access MySQL as root just fine:
user@ubuntu:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant all on *.* to test identified by 'testing123';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR test;
+--------------------------------------------------------------------------------------------------------------+
| Grants for test@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' IDENTIFIED BY PASSWORD 'xxxxxxxxxxx' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
user@ubuntu:~$ mysql -u test -p
Enter password:
ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)
userk@ubuntu:~$
Can someone please help?
Thanks!
user@ubuntu:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant all on *.* to test identified by 'testing123';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR test;
+--------------------------------------------------------------------------------------------------------------+
| Grants for test@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' IDENTIFIED BY PASSWORD 'xxxxxxxxxxx' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
user@ubuntu:~$ mysql -u test -p
Enter password:
ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)
userk@ubuntu:~$
Can someone please help?
Thanks!