On my computer yesterday I installed 12.04 and applied all updates. I have installed lamp on this system using following command sudo apt-get install lamp-server^ phpmyadmin
. I created a new user from phpmyadmin and given that user all the global privileges, but I am not able to login using that new user, I have also restarted the mysql service, reload the privileges, but still its not working. It used to work fine in Ubuntu 10.04.
-
try in terminal: mysql -u username -p [hit enter and give appropriate password]. Let use know the error message.– shantanuJun 20, 2012 at 3:34
-
The problem is that during the creation of user, I selected anyhost. But then I deleted the user and selected localhost and now its working.– hsinxhJun 21, 2012 at 7:23
Add a comment
|
1 Answer
Mysql is a bit odd in the fact that you if you want to login from that server only it is 'username'@'localhost' but if you need to login in from another server also you have to add a second user entry 'username'@'ipaddress' or 'username'@'%' for any host (apart from local host) and then grant privileges user each variation.
grant all on mydb.* to 'username'@'localhost'......... ; grant all on mydb.* to 'username'@'%' ......;