
MySQL
- 1 ответ
- 0 вопросов
3
Вклад в тег
sudo service mysql stop
sudo mysqld --skip-grant-tables --user=root
/etc/mysql/mysql.conf.d/mysqld.cnf
в секцию [mysqld]
добавить строчкуskip-grant-tables
и выполнить sudo service mysql restart
mysql -u root
UPDATE mysql.user SET authentication_string=PASSWORD('<новый пароль>'), plugin='mysql_native_password' WHERE User='root' AND Host='localhost';
FLUSH PRIVILEGES;
sudo service mysql restart
skip-grant-tables
в /etc/mysql/mysql.conf.d/mysqld.cnf
- удалить эту строчку.