Forum Stats

  • 3,824,904 Users
  • 2,260,438 Discussions
  • 7,896,343 Comments

Discussions

ERROR 1045 (28000): Access denied for user 'root'@'localhost'

User_LG3GY
User_LG3GY Member Posts: 1 Green Ribbon

I am new to Oracle Cloud and not an expert on MySql, I have built my first Arm-based Ampere A1. I was successfully able to install Apache web server. I tried to do a yum install for MySQL.

I can start and stop mysqld

/usr/sbin/mysqld (mysqld 8.0.27) starting as process 2408

I can confirm that port 3306 starts

However when I try to login into MySQL itself

$mysql -u root

I get the following error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).

I have tried the following

  1. I have updated /etc/my.cnf with a password for root 
  2. Turned off SELinux
  3.  sudo mysqld --skip-grant-tables --skip-networking

Any help is greatly appreciated!

Tagged:

Answers