Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

mysqli connect error

+3 votes
86 views
asked Feb 3 in Q2A Core by anonymous

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.

commented Feb 4 by Scott
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

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