1) Stop mysql server
# /etc/init.d/mysql stop
2) Start mysql server in safe mode in bg
# /usr/bin/mysqld_safe --skip-grant-tables &
3) Connect to mysql base and update password
$ mysql --user=root mysql
4) Restart mysql server and check root access
# /etc/init.d/mysql start
# /etc/init.d/mysql stop
2) Start mysql server in safe mode in bg
# /usr/bin/mysqld_safe --skip-grant-tables &
$ mysql --user=root mysql
mysql> update user set Password=PASSWORD('new-password-here') WHERE User='root';
mysql> flush privileges; Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges; Query OK, 0 rows affected (0.02 sec)
mysql> exit
# /etc/init.d/mysql start
Комментариев нет:
Отправить комментарий