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

Hi all,

I'm trying to install Q2A on www.guggy.com.

I've opened a MySQL db @ Godaddy, where I host the site. I haven't, however, I created a db user at any stage of the process.

Next, I inserted to qa-config.php 1. username, 2. a corresponding password, 3. database name (similar to username).  

I am still getting this error :

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/.../GUGGY.COM/qa-include/qa-db.php on line 50

 

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 realized that what might trigger this error is the fact that I hadn't opened a user on that database, and therefore I contacted Godaddy support to ask them how to do this. See below their answer. 

"When you created your database you created a database user as well. You can also create a second read-only user during the database creation process, but unfortunately it is not possible to set up a new user after database creation and only one user with pull access per database is permitted in our shared hosting environment. Our apologies for any inconvenience this may cause."

Ideas will be more than welcome. As you can easily tell, I'm not that familiar with MySQL, and I couldn't resolve this one by reading manuals / searching the web, as much as I tried.

Thanks in advance!

Assaf

by
When You create a database You normally need to create a user as well, may be that it was created automatically and prompted on a screen to You, but You did not notice that.

If You can create another database in Your package I would do so, if not may be You can delete this database and create a new one instead.

I found this on the web, may be it helps:

http://help.godaddy.com/article/36

"...Once the database is created, you can click the Pencil icon next to the database to find more information, such as its host name...."

1 Answer

0 votes
by
 
Best answer

What solved the issue eventually was using the host name on qa-config.php (instead of either localhost or 127.0.0.1):

Looks like this:

define('QA_MYSQL_HOSTNAME', '********.secureserver.net'); 

Answering myself, hope it'd help others too.

asked Mar 27, 2012 in Q2A Core by anonymous
edited Mar 27, 2012
What do I use for Gandi.net shared hosting?
by
...