Jump to content

Recommended Posts

Posted

hello i got a problem with a php script for stats..

 

$db_user = "root";  Ok

    $db_pass = "";    Ok

    $db_name = "l2jdb";  Ok

    $db_serv = "";  Error ( i dont know what i must put into?? i try a lot of ips

 

 

can some one helo me to find MySql Server Host Ip?

 

thanks

Posted

hello i got a problem with a php script for stats..

 

$db_user = "root";  Ok

    $db_pass = "";    Ok

    $db_name = "l2jdb";  Ok

    $db_serv = "";  Error ( i dont know what i must put into?? i try a lot of ips

 

 

can some one helo me to find MySql Server Host Ip?

 

thanks

Delete all these and add these lines:

 

$connect = mysql_connect("your ip goes here", "your username here", "your password here");
mysql_select_db("your database name", $connect);

 

Just replace the content inside the quotes.

 

In the part which says "your ip goes here" you have to write "localhost" if you run the website at the same machine you run your server, or your ip if your website and your server are on different machine.

 

In the second case, when the server and site are on different machine, you also have to open the port, which you had set on mysql when you installed it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..