ValentinFunk / LibK

Library for fast gmod addon development
MIT License
51 stars 21 forks source link

Problem with mysql connection #31

Closed SandeQ closed 4 years ago

SandeQ commented 4 years ago

Hello everyone.

I have a problem when i'm trying to connect the addon TTTRoleControl to database

I'm getting those weird errors on connection

[LibK] Connection failed to Update(gmod@127.0.0.1:3306): SSL connection error: unknown error number [TTTRoleControl]: error: SSL connection error: unknown error number [LibK] Connection failed to LibK(gmod@127.0.0.1:3306): SSL connection error: unknown error number

The actual config looks like that

LibK.SQL = {} --SQL Configuration LibK.SQL.UseMysql = true --Set to true to use MSQL, false will use SQLite(sv.db) --MySQL Settings LibK.SQL.Host = "127.0.0.1" LibK.SQL.Port = 3306 LibK.SQL.User = "gmod" LibK.SQL.Password = "Kutaspapaja2137+" LibK.SQL.Database = "gmodpointshop"

Did anyone have those errors? How have you solved it?

Regards SandeQ

ValentinFunk commented 4 years ago

Firstly I suggest you remove your MYSQL credentials from here, not so good to have passwords floating arround :)

Next can you clarify if role control is successfully connecting to the database? Please also try updating your MysqlOO module.

ValentinFunk commented 4 years ago

If you are controlling the MySQL server and have TLS/SSL enabled please try turning it off https://dev.mysql.com/doc/refman/5.7/en/using-encrypted-connections.html#using-encrypted-connections-server-side-startup-configuration

ValentinFunk commented 4 years ago

Hope it works for you now!