Jump to content
  • 0

Unable to Connect remotely MariaDB


HI -

I followed the installation guide on Wiki for CentOS, managed to compile the server. However when I try to use my test VPS IP for mysql connection in conf folder, server cant connect to mysql but if I use, it connects just fine.

Tried using Workbench to access my database remotely, but I can't establish a connection. Seems like the mysql server or MariaDB only allows connection from localhost or How do I fix this?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

rAthena and the database server will run on the same machine. That's why in the guide, it was set to allow connection from localhost.

If you want to remotely connect, you have to allow connection for the 'your-user'@'your-ip'. This part

Also, if you have installed a firewall or enabled iptables, you have to open and allow connection to your mysql/mariadb port.

Link to comment
Share on other sites

  • 0
Posted (edited)

first make a mysql user that suit your need.

replace user, ip, password and your_db to what you need. ip can be "%" which mean can from anywhere

CREATE USER 'user'@'ip' IDENTIFIED BY 'password';
GRANT ALL ON your_db.* TO 'user'@'ip';

note: grant all is bad practice, imo just set permission as you deem fit (i am lazy to look up permission that needed for rA db).

find in file '/etc/mysql/my.cnf' set bind-address value like below. "x.x.x.x" is ip that used when created mysql user or can be set with "" to match if you use "%" when created mysql user.

# Allow server to accept connections on all interfaces.


Edited by Litro Endemic
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.