MySQL is updating my root password and I cannot change it anymore! (MacOS Sonoma)
I’m trying to install and setup MySQL on my Machine MacBook Pro M3 Max with Sonoma 14.5 OS but it is not being possible to login anymore. This issue starts to happen after I shutdown the computer and opened it on the next day. It is not being possible to login on MySQL anymore.
When I run the the `mysql_secure_installation` command and try to setup a password, the following access denied error happens:
```sh
$ mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: YES)
```
I’ve tried to change the password for the root user by executing `sudo mysqld_safe --skip-grant-tables `, but it says that a `mysqld` process already exists.
```sh
$ sudo mysqld_safe --skip-grant-tables
2024-07-04T17:57:49.6NZ mysqld_safe Logging to '/opt/homebrew/var/mysql/Victors-MacBook-Pro.local.err'.
2024-07-04T17:57:49.6NZ mysqld_safe A mysqld process already exists
```
↳ This error is happening even after I kill all of the `mysqld`/`mysql` processes with `sudo kill -9` or `sudo pkill -9 mysqld` or `sudo killall -9 mysqld` or `sudo killall -9 mysqld_safe` or listing all the processes with `ps aux | grep mysql` and killing each one of them manually via `sudo kill -9 <process_id>`.
So, in the end, I can’t use MySQL at all on my machine. Could someone knows what is the solution or help me with that?
Thanks!
Best regards,
Subject
Views
Written By
Posted
MySQL is updating my root password and I cannot change it anymore! (MacOS Sonoma)
145
July 04, 2024 02:15PM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.