Created
November 2, 2017 07:18
-
-
Save flayder/5dcc3e8191964a7e1b6c9bf0db141473 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| если пароля не было до этого | |
| mysqladmin -u root password '1234' | |
| если пароль был. | |
| Останавливаем MySQL: | |
| /etc/init.d/mysql stop | |
| Запускаем в режиме без проверки прав доступа: | |
| /usr/sbin/mysqld --skip-grant-tables & | |
| Соединяемся как root без пароля: | |
| mysql | |
| Выбираем активную БД: | |
| use mysql; | |
| Обновляем пароль: | |
| mysql> update user set Password=PASSWORD('новый пароль') WHERE User='root'; | |
| mysql> flush privileges; | |
| Завершаем работу mysqld: | |
| fg | |
| "Ctrl+c" | |
| Запускаем MySQL в обычном режиме. | |
| /etc/init.d/mysql star |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment