2

After Successfully Installation of mysql-community-server-5.6 on Oracle Linux the mysqld service is started. But when I connect the MySQL following error has been occur.

init.d]# service mysqld status
mysqld (pid 2563) is running...
]# mysql
]# ERROR 1045 (28000): Unknown error 1045

Please advice me how to fix this problem.

SHAHID
  • 21
  • 1
  • 3
  • This might answer your question: http://stackoverflow.com/questions/489119/mysql-error-1045-access-denied – Shizzle Jul 03 '16 at 05:48

1 Answers1

1

This is probably due to invalid or missing authentication data. If you know the root (or any user) password, check if mysql -u root -p works or not.

If yes, you can create /root/.my.cnf in the following format to enable autologin.

[client] user=root password='your_root_pass'

Some older versions of MySQL do not accept password within quotes.

Seff
  • 1,546
  • 1
  • 17
  • 19