Hello Everyone in Grandworld of Drupal,

Its time for me to learn more about php and connecting to my database.

So this is it.

I am moving a number of my sites to another server that is in my country.

This server is very security minded which is a good thing of course.

I have done the general Drupal install and I cannot connect to the database and I get the unsupported database type banner when I go to site I am currently
working on which is http://nikinpink.com

The server says they have agreat number of accounts using Drupal but are not sure how they are connecting to their database.

So i am reading this below note from them:

Please make it a bit more clear if the drupal is going to use the db_url : mysql://nikinpink:password@mysql9.servage.net/nikinpink instead of actual coonection to the database. I have checked your account and could not find any such settings using which it can connect to the database.

Please note that due to security considerations we do not allow connections to our mysql server from outside our network. If we did allow this the security of our systems would be affected.

Once you create a database using there system they offer a small php sample how to connect to the database as shown below


$connection = mysql_connect("mysql9.servage.net","nikinpink","password");
mysql_select_db("nikinpink", $connection);
 

So how do I take this php sample and apply it to drupals settings.php file

thanks

Johnny

johnny@mybanffphotographer.com

Comments

Heine’s picture

Drupal builds a connection string from the db_url. For the unsupported database point your provider to Unsupported database type during setup or the link therein.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.

nevets’s picture

Instead of mysql9.servage.net/nikinpink have you tried localhost/nikinpink?

Johnny’s picture

Yes, I have tried and my server has notified me that this will not be recognized.

The support from my server says:

They continue to let me know many Drupalers us them but are not aware how they configure their settings.php file to connect to the database

For mysql connectivity we don't allow remote mysql connection. Also don't use localhost when you are trying to connect the database via a script.

Thanks for the replies!
Johnny