xbread / SantosRP

MIT License
7 stars 5 forks source link

[SQL] Read-only database connected. #10

Closed maxwebbnz closed 3 years ago

maxwebbnz commented 3 years ago

Hi there,

What an awesome project by the way! Will look forward to contributing and helping with this repository as it develops and hopefully we can add some stuff from our server development to this project for other people.

Currently, however, we are having an issue of every database we try (with all permissions enabled), it spits out this error here: [SQL] Read-only database connected.

We also get this issue here in console:

[ERROR] gamemodes/santosrp/gamemode/sv_mysql.lua:268: attempt to call method 'IsConnected' (a nil value)
1. PooledQueryWrite - gamemodes/santosrp/gamemode/sv_mysql.lua:268
2. InitGamemodeTables - gamemodes/santosrp/gamemode/sv_mysql_player.lua:35
3. Connect - gamemodes/santosrp/gamemode/sv_mysql.lua:29
4. unknown - gamemodes/santosrp/gamemode/init.lua:50

It says that it is attaching write workers but it doesn't actually init any tables inside the database,

MySQLoo is installed and tmysql4 is in the lua/includes/modules as it should be.

Any advice/fixes?

maxwebbnz commented 3 years ago

So with playing around and in looking at an issue on this repository, I found that I needed to use a dll of tmysql4, in doing so I have removed the .lua file and added the module, now though I get this issue here:


[ERROR] gamemodes/santosrp/gamemode/sv_mysql.lua:7: Couldn't load module library!
1. require - [C]:-1
2. unknown - gamemodes/santosrp/gamemode/sv_mysql.lua:7
3. include - [C]:-1
4. unknown - gamemodes/santosrp/gamemode/sv_manifest.lua:88
5. include - [C]:-1
6. unknown - gamemodes/santosrp/gamemode/sh_init.lua:18
7. include - [C]:-1
8. unknown - gamemodes/santosrp/gamemode/init.lua:7

I have added the dll into the lua/bin module but I am still getting issues, any fixes? image