Jump to content

Problem getting MySql to connect

Pending 2.3.1

Smithy
Smithy

Posted

Im getting the following error back from PlayerRanks

(14:56:40) | [PlayerRanks] Couldn't connect to SQL. Please check config credentials and ensure that SQL host is whitelisting Rust server IP.

I have the Oxide.MySql dll loaded and if I use MySql client on the same machine and same user as the rust server is running using the following commmand

mysql -h 192.168.1.112 -P 3306 -u rust -p

It connects correctly. I have checked multiple times that the password is correct and from within MySql as per above, I can create new tables.

The end of my PlayerRanks.json file looks like this

  "MySQL": {
    "useMySQL": true,
    "autoWipe": false,
    "sql_port": 3306,
    "sql_host": "192.168.1.112",
    "sql_db": "PlayerRanks",
    "sql_user": "rust",
    "sql_pass": "password_here",
    "tablename": "playerranksdb",
    "LBtableName": "playerranksLeaderdb"
  }

Using MariaDb ver 5.5.5-10.11.6

Any idea what I might be doing wrong ?

  • Administrator
Steenamaroo

Posted

Hi,
Are you saying the Rust server and SQL server are running on the same box?
If so you might try localhost or 127.0.0.1 in the sql_host field.

Smithy

Posted (edited)

No, the rust server and sql server are on different boxes. The rust server is on 192.168.1.1 and sql is on 192.168.1.112

Edited by Smithy
  • Administrator
Steenamaroo

Posted

Oh, ok. Two different boxes on the same local network.

I just fired up mamp on my  laptop and successfully saved PlayerRanks SQL from my server computer - They're two different machines on the same local network.
It worked fine.

What error are you getting from PlayerRanks when you do console command 'playerranks.save'?

 

All I did at the SQL end was create a blank db with a name that I put in PlayerRanks config,
and create a new SQL user with privs for insert/update/delete/create/drop.

For the user make sure host name is set to either % for wildcard, or the specific IP of the Rust server computer.

GameArea.cz

Posted

Same here. MariaDB 11.7.2. Only PlayerRanks cannot connect to the SQL server.

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.5k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.