Jump to content
  • 0

Connect Scripts from site with server


L2OLDPLAYER

Question

Hello I have a problem because I don't understand something I have a website on xxx.com server I have a script uploaded there to create accounts for the server and now so if I have a server made on my computer on localhost then in the config I give 
     $server_host = 'My IP not localhost ; <---.
    $db_user_name = 'root';
    $db_user_password = '';
    $db_database = 'l2jmobiusclassicinterlude;

but when I want to connect to it the page says : Failed to connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO)

so how to connect it so that the script from the website on another server works with my server and the database which is standing on my computer

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
3 hours ago, L2OLDPLAYER said:

could you elaborate? Add a user with some special accesses? I use Navicat

Firstly you need change bind-address in mysql config file. Then create another user. There is many guides in google. Keyword `Mysql remote access`.

After all you need configure firewall to allow access only from website.

Link to comment
Share on other sites

  • 0
16 minutes ago, wongerlt said:

Firstly you need change bind-address in mysql config file. Then create another user. There is many guides in google. Keyword `Mysql remote access`.

After all you need configure firewall to allow access only from website.

I change this in mysql 
# Change here for bind listening
# bind-address="127.0.0.1" 
# bind-address = ::1          # for ipv6
bind-address ="0.0.0.0"

 

and add new user to detabase with all privilages , so now how configure this firewall?

Link to comment
Share on other sites

  • 0
18 minutes ago, L2OLDPLAYER said:

I change this in mysql 
# Change here for bind listening
# bind-address="127.0.0.1" 
# bind-address = ::1          # for ipv6
bind-address ="0.0.0.0"

 

and add new user to detabase with all privilages , so now how configure this firewall?

What os?

Link to comment
Share on other sites

  • 0
3 hours ago, L2OLDPLAYER said:

It's windows but in fact if I buy vps hosting and put the server there, the website can be on localhost and it will work, right? 

What u mean on localhost? On ur pc?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...