pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
196 stars 78 forks source link

MYSQL41-4 CConnection::CConnection - establishing connection to MySQL database failed: #2019 'Can't initialize character set unknown (path: compiled_in)' #266

Closed rorosin closed 2 years ago

rorosin commented 2 years ago

Hi, if i trying connect to mysql i got the error. Error: CConnection::CConnection - establishing connection to MySQL database failed: #2019 'Can't initialize character set unknown (path: compiled_in)'

Connect code:

dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS); switch(mysql_errno()) { case 0: print("[MYSQL] Connected WITHOUT errors!");//if no errors default: printf("[MYSQL] Has connect ERROR! Code: %d", mysql_errno());//if has any error }