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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...