Sample Header Ad - 728x90

MySQL root password reset

1 vote
0 answers
136 views
I've spent many an hour trying to reset my mysql root password with no luck. I'm running an up to date patched Ubuntu server 22.04.4 with mysql 8.0.36. My latest attempt is using sudo mysqld_safe --skip-grant-tables --skip-networking & followed by mysql -u root or sudo mysql -u root but I'm met with the response ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111) This is true as it doesn't look to be running on port 3306. Using sudo mysqld_safe --skip-grant-tables --skip-networking PORT=3306 & also doesn't work. MySQL rungs quite happily on TCP 3306 when started using sudo systemctl start mysql.service chris@ubuntu-util:~$ sudo mysqld_safe --skip-grant-tables --skip-networking & 7261 chris@ubuntu-util:~$ 2024-06-05T06:49:43.386242Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2024-06-05T06:49:43.390991Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists. mysql -u root ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111) + Exit 1 sudo mysqld_safe --skip-grant-tables --skip-networking Does anyone have any suggestions as to how to sort this?
Asked by user2112 (11 rep)
Jun 5, 2024, 07:26 AM
Last activity: Jun 5, 2024, 11:34 AM