Debug SQL Error


#1

I have installed Easy Engine on a Linode VPS, and previous to this issue have installed several sites on it using:

ee site create domainname.com --wpfc

If my memory serves me, I believe this error started after I updated EE (to what version I don’t remember).

At any rate, while installing using the above command, after the script downloads WordPress, I get the following error:

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

I am able to log directly into phpMyAdmin at port 22222 using ‘root’ and ‘mypassword’.

I have a ~/.my.cnf file which matches the credentials I used to get into phpMyAdmin:

[client] user=root password=mypassword

I guess I could manually create the database through phpMyAdmin, but that seems to be defeating the purpose of the script and I’m not sure if I’m creating other issues by doing this?

Not sure how to debug this. Can you please walk me through it? I’ve done a lot of Googling but can’t get to the finish line.

Much appreciated!

Jim


#2

Did you able to login into mysql using following command?

mysql

Above command used your ~/.my.cnf user credentials.


#3

No sir,

When I type the command

mysql

I get the following error message:

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


#4

@marketfuse

mysql -h 127.0.0.1 -u root -p

Can you confirm above command is working ?


#5

Miteshshah,

When I run that command, I am prompted for a password. When I use the same password as the one in the ~/.my.cnf file I get an MYSQL prompt.


#6

@marketfuse

Login in to MySQL using following command

NOTE: Replace MySQL_PASSWORD with your Mysql root password

mysql -h 127.0.0.1 -u root -p
mysql > grant all privileges on *.* to 'root'@'localhost'  IDENTIFIED BY 'MySQL_PASSWORD' with grant option;
mysql > flush privileges;

Now logout and run following command

mysql

#7

After following the directions you gave, when I run the

mysql

command, I still get:

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


#8

@marketfuse

Please provide us login details so we can cross check the issue.


#9

ISSUE: Your mysql password contains some special characters in ~/.my.cnf file Fix this by adding quotes

root@clients:~# cat .my.cnf 
[client]
user=root
password="Password_#"

Seems Like you changed root password as EasyEngine don’t used any special characters when generating mysql root password.

Now following command works fine

mysql

#10

Thanks Miteshshah! I know we’re across the world from each other, but please allow me to buy you lunch. You guys are top notch. Let me know how I can do that.

Best,

Jim


#11

Thanks a lot @marketfuse.

You can use this link: https://rtcamp.com/donate/?project=easyengine :slight_smile:


#12

You should reset your MySQL root password. You can use this guide.


#13

Hello @marketfuse

I hope your query is resolved. I am closing this support topic for now.

Feel free to create a new support topic if you have any queries further. :slight_smile:


#14