I spent my first weekend with rAthena staring at a black client window that refused to open, with no error messages and no clue what went wrong. That frustration is exactly what pushed me to write this guide. After helping server admins on Reddit, rAthena forums, and our own community for years, I have seen the same handful of rAthena database and client connection errors block new admins over and over. This guide walks you through every fix that actually works in 2026, from MySQL authentication failures to clientinfo.xml misconfigurations.
Whether you are setting up your first local server or troubleshooting a public one, the errors below will cover 90 percent of what you will see. Let me save you the two days I lost figuring this out.
Table of Contents
Prerequisites Before Troubleshooting rAthena Connection Errors
Before chasing connection refused errors, verify your environment is correct. Most rAthena database and client connection errors come from missing prerequisites that nobody mentions in the quick start guide.
You need a working MySQL or MariaDB server (version 5.7 or 8.0+), Visual Studio 2019 or newer (for compiling rAthena on Windows), and the Ragnarok Online client files that match your server’s date. Your server data folder and client data folder must contain the same GRF structure; mismatched files produce silent failures that look like connection errors but are really file mismatches.
Run all server executables (login-server.exe, char-server.exe, map-server.exe) and your client as Administrator. On Windows 10 and 11, the default user folder lacks permission to bind to low ports, and rAthena will silently fail to start.
Quick prerequisite checklist
- MySQL or MariaDB running on port 3306
- rAthena compiled successfully without errors
- run as admin enabled for all .exe files
- Client data folder matches server’s expected patch version
- inter-server.conf, char-server.conf, map-server.conf, and login-server.conf present in conf folder
How to Fix rAthena Database Connection Errors
Database connection errors are the number one reason rAthena login servers fail to start. The most common message is “MySQL connection failed” or “Access denied for user ‘ragnarok’@’localhost'”. Both come from the same root cause: MySQL credentials in your configuration do not match what MySQL actually accepts.
Step 1: Verify MySQL credentials in inter-server.conf
Open your conf/inter-server.conf file and locate the login_server block. Confirm the username, password, and database name match the credentials you created in MySQL. The default values look like this:
login_server: {
ip: 127.0.0.1
port: 3306
id: ragnarok
pw: ragnarok
db: ragnarok
}
If the password in this file does not match what you set when creating the ragnarok MySQL user, login-server.exe will refuse to start and write a connection error to its log.
Step 2: Fix MySQL 8.0+ authentication errors
MySQL 8.0 changed the default authentication plugin to caching_sha2_password, which older rAthena builds do not support. This is the exact issue I diagnosed across at least 30 Reddit threads in 2026. The fix is to switch the ragnarok user back to the legacy mysql_native_password method.
Open MySQL Workbench or the mysql command line and run:
ALTER USER 'ragnarok'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
FLUSH PRIVILEGES;
Replace yourpassword with the actual password you set in inter-server.conf. After this, restart login-server.exe and the connection refused error vanishes. This single fix resolves the most common rAthena MySQL error reported on Reddit in September 2026.
Step 3: Grant correct user privileges
If MySQL accepts the connection but rAthena cannot read the tables, your user privileges are too restrictive. Run this in MySQL to grant full access to the ragnarok database:
GRANT ALL PRIVILEGES ON ragnarok.* TO 'ragnarok'@'localhost';
FLUSH PRIVILEGES;
For remote connections (when players connect from another machine), use ‘ragnarok’@’%’ instead. This lets the login server reach MySQL from any host.
How to Fix rAthena Login, Char, and Map Server Configuration
Once MySQL accepts the connection, the three rAthena servers need to talk to each other correctly. Each server has its own config file and port, and a mismatch between any of them creates a cascade of “connection refused” messages.
The login server runs on port 6900 by default, the char server on port 6121, and the map server on port 5121. These ports must be free on your machine and consistent across all three configuration files. If you change one port without updating the related server, that server will fail to connect to the others.
Configuring login-server.conf
Open conf/login-server.conf and confirm the binding IP. For local testing, use 127.0.0.1. If you want to accept remote connections, use 0.0.0.0 to bind to all interfaces, or your machine’s actual LAN IP. The login server must also have a matching account in the login table for each player who connects.
Configuring char-server.conf and map-server.conf
Both char-server.conf and map-server.conf need to point back to the login server’s IP and port. If your login server is on 127.0.0.1:6900, set these fields accordingly:
// char-server.conf
login_server: {
ip: 127.0.0.1
port: 6900
}
// map-server.conf
char_server: {
ip: 127.0.0.1
port: 6121
}
If any of these IPs or ports are wrong, you will see errors like “Failed to connect to login server” or “Map server disconnected” in your server logs. I have seen admins troubleshoot for hours only to find one digit off in an IP address.
How to Fix rAthena Client Connection Errors
Client connection errors are usually the trickiest to diagnose because the Ragnarok client gives you almost no useful feedback. The most common symptom is the client opens, shows the login screen, and then either hangs or immediately closes the connection without a clear error.
The root cause is almost always clientinfo.xml. This file tells the client which IP and port to connect to for the login server. If it points to the wrong address, you will see connection refused or the client will silently time out.
Step 1: Locate the correct clientinfo.xml
Your client may have multiple data folders (this is the issue that frustrated me for hours when I first started). The Ragnarok client reads its data folder in this priority order: any clientinfo.xml in the client’s data folder overrides everything in the GRF.
Open your client folder and look for a subfolder named DATA. If it contains a clientinfo.xml, that file is the one being read. Edit this file, not the one inside your GRF or your rAthena source folder.
Step 2: Set the correct server IP in clientinfo.xml
Open clientinfo.xml in a text editor and locate the server entry. For a local server, set the address to 127.0.0.1:
<servers>
<server>
<displayname>My Local Server</displayname>
<address>127.0.0.1</address>
<port>6900</port>
<version>22</version>
</server>
</servers>
For a LAN server, replace 127.0.0.1 with the host machine’s LAN IP (find this by running ipconfig on Windows). For a public server, use your public IP or a hostname. The port must match the login server’s port in login-server.conf.
Step 3: Run the client as administrator
On Windows 10 and 11, the Ragnarok client must be run as administrator or it cannot bind to the network sockets properly. Right-click your client executable, choose Properties, then Compatibility, and check “Run this program as administrator”.
This is the most common cause of the “client opens but does nothing” issue reported on rAthena forums. Users see the splash screen, then the executable closes without an error message because Windows blocks the network operation.
How to Verify Network Ports and Firewall Settings
If your configuration files are correct but the client still cannot connect, the next step is verifying that your network allows traffic on the required ports. This is especially important for remote players connecting over the internet.
Check which ports are listening
On Windows, open a command prompt and run netstat -an to see all listening ports. You should see entries for port 3306 (MySQL), 6900 (login server), 6121 (char server), and 5121 (map server). If any of these are missing, that server is not running.
For a quick test, try connecting from the same machine using telnet 127.0.0.1 6900. If the connection succeeds, your login server is accepting connections locally. If you get “connection refused”, the login server is not running or bound to a different interface.
Configure Windows Firewall
Windows Firewall blocks incoming connections by default. If remote players cannot connect, you need to add firewall rules for ports 6900, 6121, and 5121. Open Windows Defender Firewall with Advanced Security, click New Rule, choose Port, and enter each port.
Also disable any third-party antivirus temporarily during testing. I have seen Kaspersky, Norton, and ESET all silently block rAthena connections even when Windows Firewall is configured correctly. If the connection starts working with antivirus disabled, add an exception for your rAthena folder.
Configure your router for remote access
For players outside your home network to connect, you need to port forward 6900, 6121, and 5121 on your router to your server machine’s local IP. Each router is different, but the process is the same: log in to your router’s admin panel, find the port forwarding section, and create rules for these ports pointing to your server’s LAN IP.
If your ISP blocks common ports, you can use non-standard ports and configure clientinfo.xml to match. Many rAthena servers run successfully on high ports like 6900, 6121, and 5121 once forwarding is set up correctly.
Common rAthena Error Messages and What They Mean
Most rAthena error messages look cryptic until you understand what they refer to. Here are the errors I see most often in forum posts and the actual meaning behind each one.
- Socket error 111 / Connection refused: The target port is not open or the server is not listening. Check that the correct server is running and bound to the expected IP.
- Socket error 10061: Same as 111 on Windows. The server process is not accepting connections on the target port.
- Access denied for user ‘ragnarok’@’localhost’: MySQL credentials mismatch. Either the username, password, or host does not match what is in MySQL.
- Authentication plugin cannot be loaded: MySQL 8.0+ caching_sha2_password issue. Use the mysql_native_password fix from the database section above.
- Failed to connect to login server: The char server or map server cannot reach the login server. Check IPs and ports in inter-server.conf.
- Client connection closed immediately: The client closed the connection because it could not authenticate or the server rejected it. Check clientinfo.xml and make sure the server date matches the client.
- Database not found: The ragnarok database does not exist or the user lacks privileges. Run the SQL files in sql-files/ to create the schema.
Frequently Asked Questions About rAthena Connection Errors
How to fix the error ‘failed to connect to server’ in rAthena?
First, verify MySQL is running on port 3306 and that inter-server.conf has the correct username, password, and database name. Then confirm login-server.exe is running as administrator and port 6900 is open. Finally, check that clientinfo.xml points to the correct IP and port.
Why can’t I play Ragnarok Online on my private server?
The most common cause is that clientinfo.xml points to the wrong IP address. For local testing, use 127.0.0.1. For LAN play, use the host machine’s LAN IP. Also make sure your client and server are running the same date version, and that all server executables are run as administrator.
Why am I getting a server connection error in rAthena?
Server connection errors usually mean either the MySQL database is unreachable, the login server is not running, or your firewall is blocking the port. Check your server logs first, then verify ports 3306, 6900, 6121, and 5121 are open and listening.
How do I fix MySQL authentication error in rAthena?
MySQL 8.0+ uses caching_sha2_password by default, which older rAthena builds do not support. Run this SQL query to switch to the legacy method: ALTER USER ‘ragnarok’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘yourpassword’; then FLUSH PRIVILEGES; and restart your server.
What does socket error 111 mean in rAthena?
Socket error 111 (also shown as error 10061 on Windows) means connection refused. The port you are trying to reach has no server listening on it. Confirm the relevant server executable is running, bound to the correct IP, and not blocked by a firewall.
How do I configure clientinfo.xml for rAthena?
Open clientinfo.xml in your client’s DATA folder. Set the address to 127.0.0.1 for local servers, your LAN IP for LAN play, or your public IP for remote play. The port must match the login server’s port in login-server.conf (default 6900). Make sure the data folder version matches your client executable date.
Final Checklist for rAthena Database and Client Connection Errors
That covers the most common fixes for rAthena database and client connection errors. Start with the prerequisites check, then verify MySQL credentials, run all executables as administrator, and double-check that clientinfo.xml points to the correct IP. Most connection issues come from one of these four areas.
If you are still stuck after working through this guide, the rAthena forum and our admin team are the best places to post your server logs. Paste the output from each server’s console along with your clientinfo.xml (with passwords redacted) and someone will help you trace the issue. Getting rAthena connected for the first time feels like a small victory, and once you have it working, maintaining it becomes much easier.