Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
656 views
in Q2A Core by

I am trying to install q2a in localhost i got an error like

Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges.

I am sure that my connection is okay.I don't know why i am get this error.Your help would be appreciated.

by
What happens if you run this in its own PHP script:
mysqli_connect('localhost', 'username', 'password', 'database');

Replace those strings with your actual username/pw

2 Answers

+1 vote
by
RESTART MYSQL
+2 votes
by
I think this happens when user load is more on site.....just restarting mysql or complete server will fix problem.
...