Necrophile Posted February 29, 2012 Posted February 29, 2012 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 Quote
Kjapa Posted February 29, 2012 Posted February 29, 2012 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. Quote
Necrophile Posted February 29, 2012 Author Posted February 29, 2012 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.. Quote
Necrophile Posted March 5, 2012 Author Posted March 5, 2012 check his ip and add there i tested but nothing.. Quote
Pauler Posted March 6, 2012 Posted March 6, 2012 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. Quote
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.
Note: Your post will require moderator approval before it will be visible.