Jump to content
  • 0

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?

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
Answer this question...

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