If you face such an error —–>

ERROR 1045: Access denied for user: ‘root@localhost’ (using password: NO).

Solution :

You have set a password on the root account. This is a good thing. Start MySQL by:

MySQL -p

and it will prompt for the password.

If you don’t know the password, you can re-run the /scripts/mysql_install_db script to rebuild the MySQL database. You might need to delete the /data/mysql directory to do this, but I’m not positive.

Since you’ve just installed the server this shouldn’t disrupt any existing user/database relationships.

And if there’s no default password- just running “mysql” when logged into the server as root should get you in.

The method to change the password is (as root):
“update mysql.user set password=password(’newpass’) where user=’root’;”

Then try

” mysqladmin -u root -p password ” or ” mysqladmin -u user -password ”

If you’re logged into the server as “root”, then the “-u root” is optional. Mysql will use the currently-logged-in userid unless told otherwise.

If you have any queries regarding this KB, you can contact bodHOST technical support staff.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How To Deal With The Error – ‘412 Precondition Failed’?

The ‘412 Precondition Failed’ error message is displayed on any of the web pages of…

Comprehensive Tutorial: Installing Apache Modules in WHM

In this article, you will find the installation process of an Apache module in WHM.…

How To Manage The Mail Queue In WHM

The mail queue in WHM is used to manage the emails, and that is what…