pBlueG / SA-MP-MySQL

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

Can't connect to mysql via plugin on Linux localhost #236

Closed xunder-matth closed 4 years ago

xunder-matth commented 4 years ago

I'm having trouble connecting to localhost database. Getting this error: [08/19/20 18:02:19] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #1045 'Access denied for user 'db_name'@'localhost' (using password: YES)'

I'm using mysql_connect_file and this is my mysql.ini file:

hostname = localhost
username = randomuser
password = supersecurepw
database = db_name
  1. I tried with 127.0.0.1 instead of localhost
  2. I switched my password identification to mysql_native_password method
  3. From the command line, it works just fine ~/Documents/development/samp-dev$ mysql -hlocalhost -urandomuser -psupersecurepw db_name --port 3306
xunder-matth commented 4 years ago

Fixed, I'm dumb :disappointed: