Hello, I'm having trouble installing Drupal

Here is the error I get:

>>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 drupaleuro 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?

I have seen this error posted before on the forums but couldn't find a solution from the replies that worked for me.

Server: mysql14.servage.net
Database: drupaleuro
Username: drupaleuro
Password: **********

My settings.php file has $db_url set to $db_url = "mysql://drupaleuro:********@localhost/drupaleuro";

Anyone know what has gone wrong? I am with a hosting provider so I can access any of the mySQL or PHP ini files or anything. I tried putting mysql14.servage.net where localhost is but that just gave me a huge list of errors saying access denied and that I do not have permission to access this page

http://drupal.org/node/73732 is similar in a way to what I'm experiencing but I'm not sure whether the mysql database is on the same server as my drupal install. I don't beleive it is since it is a very large hosting provider.

Can anyone shed some light on this?

Thanks,

dux0r

Comments

firstov’s picture

Isn't it should be
$db_url = "mysql://drupaleuro:********@mysql14.servage.net/drupaleuro";
instead?

dux0r’s picture

Thanks for the reply, that's what I thought too

I will change it to mysql14.servage.net instead and then show you the result

I have already tried this and get a whole bunch of errors

If you could the website out http://www.eurotripped.com/Drupal/

All these errors probably mean that i CAN connect to the database now, but it says Access Denied and you are not authorised to view this page.

Warning: Table 'drupaleuro.sessions' doesn't exist query: SELECT sid FROM sessions WHERE sid = '8ff5a59ecf84b6523ae493fa903cea27' in /(details taken out)/www/Drupal/includes/database.mysql.inc on line 120 is one of lots of errors on the page

So now I dont know what all those mean. But I've left it as is for you to look at and see what I mean if you have a minute

Thank you very much!

aw-1’s picture

It seems to me that the tables haven't been created. Did you run the database script database.4.1.mysql (or its 4.0 counterpart)? These "access denied" errors you get are from Drupal, not MySQL.

dux0r’s picture

Ok we're getting somewhere, thanks for the reply!!

no I didnt run that script yet. My apologise, I'm a noob at this stuff.

In my hosting providers "control panel" they have a create mysql database button which sets up the database, I guess it only set up a default database which wasn't the way Drupal liked it :-)

How do I run that script ?

>>3. LOAD THE DRUPAL DATABASE SCHEME
>>Once you have a database, you must load the required tables:

>>>$ mysql -u nobody -p drupal < database/database.mysql

When I'm in phpmyadmin do I just open a query window and type that and it will work ?

And I replace the -u and -p with my username and password?

Am I on the right track here? :-)

Thanks for all your help!!

aw-1’s picture

In phpmyadmin you are already connected to a database, so you can skip the username and password. I would try to paste the contents of the database.mysql file to the query window (be careful to pick the correct one for your database version). But I never really worked with phpmyadmin, so it is just a guess :-).

dux0r’s picture

The version of MySQL I'm running is 5.0.15 apparently

There seems to only be database files for MySQL 4.0 and 4.1???

What should I do ?

Thanks

dux0r’s picture

Hey thanks very much for that reply

What I did was select the database.4.1.mysql file, did a select all on the information, went to phpmyadmin and opened a query window, and pasted it all in. To my amazement the text correctly formatted itself when I pasted it (Not all messed up like in Notepad) and I pressed go, and all the tables appeared! I nearly fell off my chair in amazement.

Then I reloaded the page and this is where I'm up to http://www.eurotripped.com/Drupal

It says Welcome to your new Drupal website!

So hey I guess it worked! I havent had time to go past this bit yet, but it all looks good up to this point.

Thanks so much for that!

dux0r