mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Update dbConnect

Open Xenius97 opened this issue 2 years ago • 5 comments

Describe the bug

The current MTASA database management is very outdated and does not support the latest MySQL authentication plugins. The mysql_native_password is a very old, deprecated authentication method. Currently, if you are using MySQL version 8 or above, it will continuously generate warnings due to the use of this outdated authentication method.

When you try to use newest authentication method: image

I have 3GB of warning logs due to this issue, and I tried to disable them, but unfortunately, there is no way to do so.

2023-11-12T19:37:23.199353Z 1350958 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2023-11-12T19:37:23.323502Z 1350959 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2023-11-12T19:37:23.699421Z 1350960 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Mysql version: 8.0.34 - MySQL Community Server - GPL

Steps to reproduce

Use mysql 8+

Version

No response

Additional context

No response

Relevant log output

No response

Security Policy

  • [X] I have read and understood the Security Policy and this issue is not security related.

Xenius97 avatar Nov 13 '23 10:11 Xenius97

Relates to #2772

Lpsd avatar Nov 13 '23 10:11 Lpsd

We can update the MySQL library to the latest version, but I think it might break backward compatibility, requiring every user using MySQL relational databases to change the default authentication plugin to mysql_native_password.

znvjder avatar Nov 13 '23 19:11 znvjder

but I think it might break backward compatibility

Could be add a new argument, which defines what version are you using. Mysql 5.7 is no longer supported since 2023 October.

Xenius97 avatar Nov 13 '23 19:11 Xenius97

We can update the MySQL library to the latest version, but I think it might break backward compatibility, requiring every user using MySQL relational databases to change the default authentication plugin to mysql_native_password.

Breaking compatibility is a necessary evil sometimes if it means forcing communities to adopt the latest security standards. I'd consider forcing them to update their MySQL databases as one of those necessary changes. Just give them a decent enough heads up that it will happen and in what version.

MegadreamsBE avatar Nov 13 '23 19:11 MegadreamsBE

Could be add a new argument, which defines what version are you using. Mysql 5.7 is no longer supported since 2023 October.

I don’t see the point of using two identical libraries just so users can choose the version they’ll be compatible with.

I'd consider forcing them to update their MySQL databases as one of those necessary changes. Just give them a decent enough heads up that it will happen and in what version.

I think it’s a very good idea. 👍

znvjder avatar Nov 13 '23 20:11 znvjder