MySQL root Passwort Ubuntu 18

sudo service mysql stop
sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld

Manuell starten:

sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &

rennts wirklich?

jobs

Ohne Passwort rein:

mysql -u root
FLUSH PRIVILEGES;
USE mysql;
UPDATE user SET authentication_string=PASSWORD("mysecret") WHERE User='root';
UPDATE user SET plugin="mysql_native_password" WHERE User='root';
quit
sudo pkill mysqld
sudo service mysql start
mysql -u root -p

Thanks to linuxconfig.org