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

Warning: mysqli::mysqli(): (42000/1044): Access denied for user 'eatlu_db_user'@'' to database 'eatlu_data”' in/home/shashankaggarwal/public_html/qa-include/qa-db.php on line66

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.


Super newbie here folks. Any help would be appreciated.

Have you done proper database configurations in qa-config.php .
If not please follow instructions here - http://www.question2answer.org/install.php

1 Answer

+3 votes

Check list:

1) Have you created the database?

If not (this you ask for your superuser password if you are the administrator,

 mysql -u root -p

create database databasename;

2) Have you changed the file qa-config-example.php and saved as qa-config.php?

If not, change the lines:

    define('QA_MYSQL_HOSTNAME', ''); // In case of localhost
    define('QA_MYSQL_USERNAME', 'root'); // Change if you want to use a different user to this database
    define('QA_MYSQL_PASSWORD', 'yourpassword');
    define('QA_MYSQL_DATABASE', 'yourdatabaseassociatedtoQ2A');

3) If are not using "root" in ubuntu (I dont know about windows or mac) to access your database, it is good to check if the user you created has the privillege to EDIT or CREATE databases. Only the "root" by default can do that. See:



edited by
Other tips: Make sure you aren't using old credentials. Search for typos, and misplaced data.