MySQL Error: SQLSTATE[28000] [1045] Access denied

SQLSTATE[28000] [1045] Access denied MySQL Error

These kind of errors can appear either in the application side log, screen or in MySQL error log.

Check MySQL Error Log

#1 Find error log path , to find your error long you can follow one of the below methods:

A)
mysql --help | grep "Default options" -A 1
cat /etc/my.cnf | grep -i error

 

b)
find / -type f -name my.cnf
cat /etc/my.cnf | grep -i error

Now you can check your error log for more details about the error:

vi /mysql/data/mysql_logs/mysql-error-log.err

Or

cat /mysql/data/mysql_logs/mysql-error-log.err | egrep -i "Access denied"

Fix:

Now you need to create a user matching the source server and destination by following the create MySQL user article.


Subscribe to
for video tutorials updates