0

I have a xampp installation on my ubuntu machine. And I am trying to use phpmyadmin to access mysql. But every time I start xampp and try to open phpmyadmin I get an error that says mysqli::real_connect(): (HY000/2002): Connection refused. I have read some questions and changing mysql password seems to fix this. But I don't want to change mysql password every time I restart my pc. Is there any way to fix this? Any help would be appreciated. Thanks

1 Answer 1

1

I think this is due to a recent change in MySql for Ubuntu, MySql wont allow root user to login via apache/phpmyadmin/any web interface.

Try login to Mysql in ubuntu terminal and create a new user with root privileges and configuring phpmyadmin to use that user will solve the issue.

Type this in our terminal

$ sudo mysql -u root -p

proceed with your password.

I strongly recommend you to use LAMP stack instead of packaged XAMPP, (Installing and configuring PHP, Apache2 individually) because XAMPP might not be as handy as it in Windows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .