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

mysqli connect error

+3 votes
asked Feb 3, 2017 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, 2017 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

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