Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
abills:docs:manual:other:mysql_passwd_reset:ru [2017/07/04 10:47] asmodeus [FreeBSD] |
abills:docs:manual:other:mysql_passwd_reset:ru [2017/07/04 10:51] (текущий) asmodeus [CentOS] |
||
---|---|---|---|
Строка 112: | Строка 112: | ||
====CentOS==== | ====CentOS==== | ||
+ | ===6.0=== | ||
Останавливаем демон MySQL и запускаем его без чтения таблицы юзеров | Останавливаем демон MySQL и запускаем его без чтения таблицы юзеров | ||
Строка 130: | Строка 131: | ||
===7.0=== | ===7.0=== | ||
- | * Stop mysql: | + | * останавливаем mysql |
systemctl stop mysqld | systemctl stop mysqld | ||
- | * Set the mySQL environment option | + | * устанавливаем переменную среды для входа без пароля |
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" | systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" | ||
- | * Start mysql usig the options you just set | + | * перезапускаем mysql |
systemctl start mysqld | systemctl start mysqld | ||
- | * Login as root | + | * заходим под рутом |
mysql -u root | mysql -u root | ||
- | * Update the root user password with these mysql commands | + | * обнуляем паролья |
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('') | mysql> UPDATE mysql.user SET authentication_string = PASSWORD('') | ||
Строка 153: | Строка 154: | ||
mysql> quit | mysql> quit | ||
- | * Stop mysql | + | * останавливаем базу |
systemctl stop mysqld | systemctl stop mysqld | ||
- | * Unset the mySQL envitroment option so it starts normally next time | + | * обнуляем переменную вход без пароля |
systemctl unset-environment MYSQLD_OPTS | systemctl unset-environment MYSQLD_OPTS | ||
- | * Start mysql normally: | + | * запускаем базу в нормальном режиме: |
systemctl start mysqld | systemctl start mysqld | ||
- | * Try to login using your new password: | + | * тестового заходим: |
mysql -u root -p | mysql -u root -p |