Jump to content
  • 0

Connect Scripts from site with server


Question

Posted

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

10 answers to this question

Recommended Posts

  • 0
Posted
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.

  • 0
Posted
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?

  • 0
Posted
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?

  • 0
Posted
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?

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...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock