Archive for the “MySql” Category

When attempting to log into a mysql database, you may receive an error similar to the following in phpmyadmin;

#1045 – Access denied for user ‘username’@’127.0.0.1′ (using password: YES)
To correct errors like this, you need to change customers mysql password1. Log into the database server and gain root access using sudo su -

2. From the prompt type mysql to open the mysql interface/

3. At the mysql> prompt, enter the following commands to change the password (changing new_password and user_name to their respective values)

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(‘new_password’) WHERE user=’user_name’ LIMIT 2;
mysql> FLUSH PRIVILEGES;

You can also use: grant all on databasename.* to username@’%’ identified by ‘password’;

4. You should receive a verification that TWO lines have been updated.

5. Type exit once to quit MySQL and a second time to logout of the Database server.

Comments No Comments »