pBlueG / SA-MP-MySQL

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

mysql_connect_file problem #153

Closed WizardFtw closed 7 years ago

WizardFtw commented 7 years ago

Im trying to connect mysql server with mysql_connect_file function, but I having problems. When is starting, I receive this message on mysql log.

[plugins/mysql] mysql_connect_file: handle error: syntax error in connection file (line: "hostname = 127.0.0.1")

but mysql.ini look be fine...

hostname = 127.0.0.1 username = myusername password = mypass database = mydb auto_reconnect = true

multi_statements = false

pool_size = 2

server_port = 3306

This only happens when I use mysql_connect_file function, with mysql_connect not.

Is there a problem with the function or am I not using it properly?

Im sorry if my English drafting is shit, it's not my native language.

maddinat0r commented 7 years ago

Can you upload the mysql.ini (the whole file) you used here? Just drag-and-drop the file into the text box.

WizardFtw commented 7 years ago

of course! but said "We don't support that file type"

here link: https://mega.nz/#!MI0jDTAA!IGHT7tx7pQaoQzR_6VYJPXO6oJ8ews5hX1VHX5ONU10

maddinat0r commented 7 years ago

Your file encoding is incorrect. Currently, it's UTF8-BOM. It should only be UTF8 though. BOM encodings are not supported.

WizardFtw commented 7 years ago

Oh, thanks. I didn't know that only support UTF8 encoding.

Solved.