FredyH / MySQLOO

MySQLOO
GNU Lesser General Public License v2.1
138 stars 55 forks source link

Strange Issue #73

Closed GeraltFromDystopia closed 3 years ago

GeraltFromDystopia commented 3 years ago

Hello. I'm making a Garry's Mod server using mysqloo module and yesterday i started to upload files on my hosting. On my local laptop i have MySQL 5.5, and hosting have MySQL 8.0. My code worked good on my laptop, but when i runned server at hosting, i got connection problems.

`[DYSTOPIAN] Connecting to Database [DYSTOPIAN] Database Connection Restarted [DYSTOPIAN] Connect to Database failed! SSL connection error: unknown error number [DYSTOPIAN] Connecting to Database ERROR] gamemodes/dystopian_rp/gamemode/base/sv_mysql.lua:89: Tried to reference lua object twice (Query started twice?)

  1. connect - [C]:-1
  2. ConnectToDatabase - gamemodes/dystopian_rp/gamemode/base/sv_mysql.lua:89
  3. unknown - gamemodes/dystopian_rp/gamemode/base/sv_mysql.lua:95 Timer Failed! [Simple][@gamemodes/dystopian_rp/gamemode/base/sv_mysql.lua (line 95)]

I got this error every time i trying to connect to database. This is code i use https://pastebin.com/yhcV5MAt to connect. And also i use mysqloo.connect for sure to connect database for DB_DYSTOPIAN. The thing is - even from my local PC i can't connect to hosting's database, but data is correct, IP is correct too. Can you please help me deal with this problem, because it's really breaking our plans and i can't realise what's the problem for long time (more than 10 hours)

FredyH commented 3 years ago

Hi, this error indicates that you are running connect twice on a database object. This is currently not supported (and most likely won't be), instead create a new database instance in that function and replace the global variable from there.