( answ | 2019. 10. 05., szo – 15:56 )

Follow the steps below.

Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).

$ mysqld --skip-grant-tables
Execute these statements.

$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
If you face the unknown field Password error above use:

update user set authentication_string=password('my_password') where user='root';
Finally, restart the instance/daemon without the --skip-grant-tables option.

$ /etc/init.d/mysql restart
You should now be able to connect with your new password.

$ mysql -u root -p
Enter password: my_password

Forrás:
https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-f…

És persze mindenhol add meg ezt a jelszót, ahol kell (bár én külön felhasználókat hoznék létre korlátozott jogokkal).