Mysql is not working

I’m installing mysql-server on ubuntu, but when i try to open it (using command prompt) it throws an error:
“ERROR 1045 (28000): Access denied for ‘root’@‘liacalhost’ (using passord: ).”
Can someone please tell me where should i go wrong in setting up mysql-server.


Re-posting is not cool



I think I saw the earlier post and someone had a link to a possible solution. On Ubuntu App Armor can interfere. It may not be the same link but see if this helps.

You installed as user root and now your trying to use as normal user with less access levels.
Check your user/group levels.
Just a thought.

No I’m using it as root user only

Possibly -
In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password.

I found this tutorial helpful setting mine up.

Also take look at “Configuring Password Access for the MySQL Root Account” section of this tutorial-and see if this applies to your problem.

I meant to mention, If you have password authentication enabled for root, use

mysql -u root -p