Я тестирую все предложенные ответы, но все же я не могу сбросить или удалить пароль или даже переустановить mysql db на Ubuntu 16.04, есть ли какая-нибудь идея ohter?
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Вы можете изменить и сбросить пароль пользователя MySQL на Ubuntu Linux. Введите следующие строки в вашем терминале.
1. Stop the MySQL Server: sudo /etc/init.d/mysql stop
2. Start the mysqld configuration: sudo mysqld --skip-grant-tables &
3. Login to MySQL as root: mysql -u root mysql
4. Replace "newpassword" with your new password:
UPDATE
mysql.user
SET
Password = PASSWORD('newpassword')
WHERE
User = 'root';
FLUSH PRIVILEGES;
exit;
Note: on some versions, if password column doesn't exist, you may want to try:
UPDATE user SET authentication_string=password('newpassword') WHERE user='root';
После изменения успеха перехода.
Ссылки:
http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/ https: // dev msgstr "Вы можете изменить и сбросить пароль пользователя MySQL на Ubuntu Linux. Введите следующие строки в вашем терминале.
1. Stop the MySQL Server: sudo /etc/init.d/mysql stop
2. Start the mysqld configuration: sudo mysqld --skip-grant-tables &
3. Login to MySQL as root: mysql -u root mysql
4. Replace "newpassword" with your new password:
UPDATE
mysql.user
SET
Password = PASSWORD('newpassword')
WHERE
User = 'root';
FLUSH PRIVILEGES;
exit;
Note: on some versions, if password column doesn't exist, you may want to try:
UPDATE user SET authentication_string=password('newpassword') WHERE user='root';
После изменения успеха перехода.
Ссылки:
http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/ https: // dev msgstr "