Any one have a solution to install on shared linux host thru godaddy, can it be done, reason why i ask is because, i setup my "mysql" DB added the proper lines in the setting files then i get the error below which i did a search for i might of found a fix in the forums but then i asked godaddy about the location of the "mysql.sock" because i need to point to it in the php settings part of the "settings.php" file but godaddy says "The 'sockets module' and 'socket connections' are disabled with CGI (Perl) scripts on our Linux shared hosting servers." so can i use drupal on godaddy at all plaase inforom me thanks!

"
Unable to connect to database server

This either means that the username and password information in your settings.php file is incorrect or we can't contact the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

Currently, the username is puppetj and the database server is localhost.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running? "

Comments

timatlee’s picture

I use GoDaddy, and their MySQL hosts aren't 'localhost'.

Open your account manager, click on Databases, and check the connection string for your DB. It'll have a 'mysql###.securehost.net' or something similar.

qwerty1234’s picture

yeah, i know about that, i tried replacing the localhost with mysqlxxx.securehost.net but i still get the error, so your using shared hosting? yoou didnt get the error? then host did you do it?

timatlee’s picture

I used the Linux shared hosting as well, yeah.

Did you replace mysqlxxx with the actual server that your DB is on?

qwerty1234’s picture

yes sorry i guess you didnt understand me, please tell me what you did to the fine detail to help me

Magicbeanz’s picture

I'm having a problem with my GoDaddy database too. I changed my username, password, host and database to match the details in my GoDaddy Hosting manager, but when I try to start up my drupal site, it says that it can't connect to the database. And yes, all the details are correct. Have I missed something?

timatlee’s picture

Can you connect to the DB you created with their copy of phpMyAdmin? Click on Open Manager in the hosting account options to verify.

If that's a no-go, I would contact godaddy then. Otherwise check, recheck, and have your friend check your $db_url in settings.php to make sure the user, password and host are correct.

qwerty1234’s picture

yes can connect to the database yes, and godaddy won't help me on this issue, because its 3rd party software. the guy in the replys (please look) got it to work, but he wont say how so i dont know what to do

timatlee’s picture

qwerty ...

Ya gotta help me out a bit more than "please help" and "I don't know what to do". Lets try some basic troubleshooting ...

What is the exact error message you are seeing? Is it a Drupal (usually has the Drupal logo and some error text)?

Can you show me your $db_url string in settings.php? Clip the password out if you choose to.

Did you follow the installation instructions that came with Drupal? When you open phpMyAdmin, do you see 40 or so tables in your database?

Do you have any other PHP scripts that connect to the database?

I had no problems getting my installation to work. I created a DB using the GoDaddy tools, copied the connection information from the GoDaddy account admin site into my settings.php file. I loaded in the mysql 4.0 tables, and I went to my site, and it worked like a charm.

qwerty1234’s picture

Timeatlee...

"Ya gotta help me out a bit more than "please help" and "I don't know what to do"."

Well if you read my org post you would fine out that i did post more then what you think, read before you belittle people!
Lets try some basic troubleshooting ...

"What is the exact error message you are seeing? Is it a Drupal (usually has the Drupal logo and some error text)?"

Read what i posted, that will help!

"Can you show me your $db_url string in settings.php? Clip the password out if you choose to."

Read my postings!!

"Did you follow the installation instructions that came with Drupal?"

OF COURSE!!!!

"When you open phpMyAdmin, do you see 40 or so tables in your database?"

No, tables (I DID IT RIGHT)

"Do you have any other PHP scripts that connect to the database?"

NOPE!

timatlee’s picture

Eghhh.. yeah.

I ask for specific error messages because since your original post, we had tried changed a few things - for instance, in your original post, you were attempting a database connection to localhost. We identified that as a problem, and corrected that. Error messages are critical when things get changed, and should be reported whenever things aren't working after changes are made.

Perhaps you should spend a little bit of time learning to walk before you can run - it seems to me from your posts that you're pretty inexperienced with PHP and/or MySQL. Search Google for "php mysql tutorial" or something similar. This might give you a bit of a foundation and help you understand what is going on in the background.

I apologize for seemingly belittling you. Your posts lack any substantial content to help anyone t/s your issue any further. I'm not a GoDaddy employee, nor am I affiliated with Drupal. I browse the forums here looking for solutions to problems I have with Drupal, and I try to pitch in where I can. As such, I personally get frustrated when I try to offer help, and the recipient then seems to expect me to read their minds (and their screen) to find and correct the problem.

Best of luck to your qwerty1234.

john_sf’s picture

I had some problems installing into my GoDaddy web hosting account and finally got it to work. I'm not sure what kind of hosting account it is, but it's the cheapest. Below are a few things I found helpful, as someone who is working with PHP or MySQL or Drupal for the first time. I haven't found the instructions in the two books I'm using all that helpful, or the documentation that came with Drupal, so I'm putting some things in here that might already have been mentioned elsewhere -- in case others later search this database for answers.

-GoDaddy is running an earlier version of PHP that does not seem to support Drupal (was it 4.1.3?). But you can do a free upgrade to "Hosting Configuration 2.0" under the GoDaddy Hosting Manager home, that gives the account summary. Configuration 2.0 gives the PHP version 4.3.3 or 5 (?) that will run the latest Drupal. It might take up to 24 hours for it to kick in after you make the change.

-In the Drupal folder "sites"-->"default" --> is the "settings.php" file. This is where you enter your hostname and database name and password, etc -- as in the instructions.

-Inside this "settings.php" file: Others have mentioned it and it sounds like you know to replace "local host" with the actual hostname that you find on GoDaddy under Databases-->MySQL-->select your database-->the pencil icon to find out the name -- probably something like "mysqlXXX.secureserver.net"

-After the changes, I copied my "settings.php" file into the "sites" folder. Maybe it wasn't necessary, but the whole thing works now where it didn't before.

-Once you have uploaded your Drupal files to your GoDaddy site, open the "Open Manager" next to the MySQL database. phpMyAdmin opens up. Select the "Query" or "SQL" button. When the new window opens, select the "import files" button and browse on your local machine to the database folder. Select either the "database.4.0.mysql" or the "database.4.1.mysql" file.

I'm not really sure which combination of the above worked and there might have been some things I forgot in the haze of trying a lot of stuff . . . but the site is working now and I'm feeling pretty geeky. Who-hoo! And thanks to others on this forum who provided other answers or clues.

timatlee’s picture

Ok.. in fine step-by-step detail as much as I can ..

  1. Go to www.godaddy.com and log in with your account ID and password.
  2. Click on My Account
  3. Click on HOsting Account List. This should open a new window.
  4. In the new window, click 'open' on your hosting account.
  5. Scroll down a bit and click on "MySQL"
  6. This will present you a list of your databases. Under the 'Actions' column, there are 3 icons - click the left icon, and a small window will appear with some information like this:
     MySQL Server Database Connection Settings
    Description:
    
    This example describes using PHP to connect to a MySQL Database on a Linux hosting account.
    <?php
    //Connect To Database
    $hostname="mysql183.secureserver.net";
    $username="username";
    $password="your_password";
    $dbname="username";
    
  7. Copy the $hostname, $username, and $dbname. You should know your password from when you created the DB, if not, contact GoDaddy to have the password reset.
  8. Now, in your settings.php file (under /sites/default/), find the $db_url line.
  9. Based on the example above, my $db_url line would look like:
    $db_url = 'mysql://username:your_password@mysql237.secureserver.net/username';
    
  10. Save and upload your settings.php file to /sites/default/, and browse to the front page of your site.

If this has failed, please report any errors that you see in fine detail.

qwerty1234’s picture

I GET THIS AFTER I FOLLOWED THE STEPS TO THE LINE!!!! btw the xxx are where the real db name is

i have no tables listed in my "myadminphp"

Warning: Table 'xxxxxxx.sessions' doesn't exist query: SELECT sid FROM sessions WHERE sid = '1350d817e230ff014e31c4254da343cc' in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: Table 'xxxxxxx.users' doesn't exist query: SELECT u.* FROM users u WHERE u.uid = 0 in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc:121) in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/bootstrap.inc on line 760

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc:121) in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/bootstrap.inc on line 760

Warning: Table 'xxxxxxx.access' doesn't exist query: SELECT * FROM access WHERE status = 1 AND type = 'host' AND LOWER('69.141.197.75') LIKE LOWER(mask) in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: Table 'xxxxxxx.access' doesn't exist query: SELECT * FROM access WHERE status = 0 AND type = 'host' AND LOWER('69.141.197.75') LIKE LOWER(mask) in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: Table 'xxxxxxx.cache' doesn't exist query: SELECT data, created, headers, expire FROM cache WHERE cid = 'variables' in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: Table 'xxxxxxx.variable' doesn't exist query: SELECT * FROM variable in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

Warning: Table 'xxxxxxx.cache' doesn't exist query: LOCK TABLES cache WRITE in /home/content/p/u/p/xxxxxxx/html/xxxxx/includes/database.mysql.inc on line 121

timatlee’s picture

Ok - since it seems to be connecting to the DB, we just need to get the tables loaded in.

So, go to your database phpMyAdmin, and log in with your credentials.

Click the SQL icon in the left column. A new window will open.

Click on Import Files

Click Browse, and find a file called "database.4.0.mysql". When I unpacked the drupal ZIP, it was under the "database" folder.

Click "Go" and wait a moment. This will populate your database with the tables for Drupal.

At this point, you can continue at step 4 in INSTALL.txt.

patbranch’s picture

I put the url for the database as well as the password and it's still not connecting to the database. Any ideas?

$db_url = 'mysql://username:my-password@mysql193.secureserver.net/databasename';

the message:
"Unable to connect to database server

If you still have to install Drupal, proceed to the installation page.

If you have already finished installing Drupal, this either means that the username and password information in your settings.php file is incorrect or that we can't connect to the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Can't connect to MySQL server on 'mysql193.secureserver.net' (4).

Currently, the username is username and the database server is mysql193.secureserver.net.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider."

gravatt’s picture

I found a one-step installation tool in GoDaddy called 'Metropolis' and I used it to install Drupal. It worked like a charm.

patbranch’s picture

I got it to connect to the database, but i'm not sure what file to import. I'm trying to setup version 5.

I tried importing database.mysql.inc and then, install.mysql.inc into the database. I got syntax errors with both of them. Which file needs to be imported for Drupal 5?