Skip to content

[help]Script Stat

Featured Replies

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

Where you have sql? If on your PC you must put "localhost" / "127.0.0.1" , but if you have sql on the hosting/dedicated , you must put here your serwer IP.

  • Author

the server is on my friends pc i upload the website.. i try and 127.0.0.1 and nothing something else?

 

Edit: i must have pass on $db_pass = "";    cuz i dont have..

  • Author

check his ip and add there

i tested but nothing..

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.