Jump to content


Photo

settings.php


  • Please log in to reply
3 replies to this topic

#1 bmbc

bmbc
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 17 April 2006 - 03:06 AM


Hi,

I'm trying to get something really simple right ;
Database URL format:

* $db_url = 'mysql://username:password@localhost/databasename';

With localhost , are you meant to put in your domain name or what?
If you are say blah.net do you put that in as localhost or just blah or
something else ?


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 17 April 2006 - 08:13 AM

No. If you have mysql installed on the server which your site is running off then you can use localhost as the server is located locally. PHP will fund where the database is automatically. However if your MySQL database is hosted of another server then you'll have to subsitiue localhost with the domain name to the remote server.

#3 bmbc

bmbc
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 17 April 2006 - 12:33 PM

[!--quoteo(post=365471:date=Apr 17 2006, 03:13 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 17 2006, 03:13 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
No. If you have mysql installed on the server which your site is running off then you can use localhost as the server is located locally. PHP will fund where the database is automatically. However if your MySQL database is hosted of another server then you'll have to subsitiue localhost with the domain name to the remote server.
[/quote]

I have mysql installed on my service provider so do I put in mysql.mydomain.net?

Thanks for your help too

Charly


#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 17 April 2006 - 02:49 PM

Is mysql installed on the same server as your hosting account? If it use localhost (try this first). If a connection to mysql doesn't succeed use mysql.domain.com if so wish to. Howver localhost should be just fine.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users