Jump to content

Bit of trouble with mysql

Pending 2.1.9

crunch
crunch

Posted (edited)

I had it up and running for quite a while on a different host, but we've moved servers so I had to set up a new mysql server on a digitalocean droplet. I can connect to it fine from my laptop and a different linux vm:

mysql -u myuser -h xx.xx.xx.xx -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 9

Server version: 8.0.28-0ubuntu0.20.04.3 (Ubuntu)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

 

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| rustinated         |
+--------------------+
2 rows in set (0.27 sec)

mysql> 

But playerranks doesn't like it for some reason:

 

"MySQL": {
    "useMySQL": true,
    "autoWipe": true,
    "sql_port": 3306,
    "sql_host": "xx.xx.xx.xx",
    "sql_db": "rustinated",
    "sql_user": "myuser",
    "sql_pass": "mypass",
    "tablename": "playerranksdb",
    "LBtableName": "playerranksLeaderdb"
  }

(the IP, user and pass are the same of course).

 

In my droplet I basically allowed all IP's to 3306 in UFW, but also specifically allowed the IP of the server box. I still just get this:

 

playerranks.save
[PlayerRanks] Couldn't connect to SQL. Please check config credentials and ensure that SQL host is whitelisting Rust server IP.
[PlayerRanks] PlayerRanks local database was saved.
Calling 'CmdSave' on 'PlayerRanks v2.1.9' took 590ms

 

Not sure what I'm missing...

Does the server box need mysql installed, or does this just take care of it - https://umod.org/documentation/api/database

Edited by crunch
crunch

Posted

Ok, well after trying a bazillion things, downgrading from mysql 8 to mysql 5 fixed it immediately. So I guess there's some compatability issue there somewhere. Working again now anyway 🙂

  • Administrator
Steenamaroo

Posted

Hey,
Thanks for coming back to let me know. I wouldn't have known that, but it's good to know moving forward. 👍

  • Like 1
Siski

Posted

а так и не решили данную проблему?

 

RustyB

Posted

Trying to connect the plugin to a MySQL 8.4 server without success 😕
I can connect to it with all my tools/app except with PlayerRanks

It was connecting without any issue to my free database on AWS which I think was MySQL 8 as well.

I'm a bit lost here, and I can't downgrade to MySQL 5
Does the plugin need updating?

HunterZ

Posted (edited)

Also started tearing my hear out not being able to figure out why it won't connect, and came here to see that it's probably a MySQL 8 incompatibility. Bummer.

Edit: Read somewhere that trying the `mysql_native_password` authentication plugin might help - will try and report back.

Edit 2: Yeah, I just can't get it working with 8.x. I added logging of the exception message (not sure why the plugin doesn't do that) and got this: "Authentication method 'caching_sha2_password' not supported by any of the available plugins."

Tried reinstalling the 8.x database with 5.x authentication and it didn't help at all. Tried going back to 8.x and recreating the account with caching_sha2_password and that didn't work either.

I guess this plugin really does only work with 5.x databases, so I'll have to try that next.

Edit 3: Yeah, was a pain to get MySQL 5.7 installed, but it works!

Edited by HunterZ
  • Administrator
Steenamaroo

Posted

I tested here.
The only way I could get things working with MySQL 8 was to add the following to the SQL config file, directly under [mysqld]

default-authentication-plugin=mysql_native_password

The MySQL user account also had to have the password changed and set to default auth, but that wasn't enough on its own.

Meiers

Posted

On 10/22/2024 at 5:17 PM, Steenamaroo said:

I tested here.
The only way I could get things working with MySQL 8 was to add the following to the SQL config file, directly under [mysqld]

default-authentication-plugin=mysql_native_password

The MySQL user account also had to have the password changed and set to default auth, but that wasn't enough on its own.

Can you help me out with this please... I just keep getting Couldn't connect to SQL. Please check config credentials and ensure that SQL host is whitelisting Rust server IP

  • Administrator
Steenamaroo

Posted

Hi,
Did you do what it said?
database name, username, password, and port must all be correct,
and the IP address of your Rust server has to be whitelisted by your SQL server.

Even if they're from the same host they're probably different IPs, so you'd still need to whitelist.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.