Page 1 of 1

Can't create database due to localhost failed

Posted: Sat Feb 25, 2017 5:33 am
by mrkidgrave
So on Vesta CP I went to DB to create a new database. However, when I try to create a database, I get an error that says "Error: Connection to localhost failed"

How can I fix this? Please help.

Re: Can't create database due to localhost failed

Posted: Sat Feb 25, 2017 5:37 am
by mrkidgrave
I just managed to fix this problem. This problem started to happen when I had changed the password of phpmyadmin. All I had to do was do nano /usr/local/vesta/conf/mysql.conf

From there I just deleted the old password, and updated with my new one. I hope this thread helps anyone who is having this issue!

Re: Can't create database due to localhost failed

Posted: Mon Feb 27, 2017 7:32 pm
by skurudo
Nice found!

If you change pass in /root/.my.cnf, you can use mysql commands from ssh console too.

Re: Can't create database due to localhost failed

Posted: Mon Jan 04, 2021 10:57 pm
by Nakao
Thank you guys for suggestion.

I recommend that you should restart MySQL after change the password. See this topic here to do that: viewtopic.php?t=17561