bmbc Posted April 17, 2006 Share Posted April 17, 2006 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 orsomething else ? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 17, 2006 Share Posted April 17, 2006 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 Link to comment Share on other sites More sharing options...
bmbc Posted April 17, 2006 Author Share Posted April 17, 2006 [!--quoteo(post=365471:date=Apr 17 2006, 03:13 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 17 2006, 03:13 AM) [snapback]365471[/snapback][/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 tooCharly Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 17, 2006 Share Posted April 17, 2006 Is mysql installed on the same server as your hosting account? If it use [b]localhost[/b] (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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.