Difference between revisions of "MySQL/version/5.7"
< MySQL
Jump to navigation
Jump to search
(Created page with "==Recovering / Setting passwords== A lot of the instructions online for doing this no longer work with 5.7. Obsolete instructions: * [https://stackoverflow.com/questions/4429...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Recovering / Setting passwords== | ==Recovering / Setting passwords== | ||
− | A lot of the instructions online for doing this no longer work with 5.7. | + | A lot of the instructions online for doing this no longer work with 5.7. The following is true for version 5.7.24-0ubuntu0.18.04.1 |
Obsolete instructions: | Obsolete instructions: | ||
Line 9: | Line 9: | ||
* [https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords Setting, Changing And Resetting MySQL Root Passwords] | * [https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords Setting, Changing And Resetting MySQL Root Passwords] | ||
** default value for [https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-grant-tables --skip-grant-tables] is now FALSE, so you have to specify <code>--skip-grant-tables=TRUE</code> | ** default value for [https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-grant-tables --skip-grant-tables] is now FALSE, so you have to specify <code>--skip-grant-tables=TRUE</code> | ||
+ | |||
+ | Also, you may need to create the <code>/run/mysql</code> folder and [[chown]] it to <code>mysql:adm</code> or whatever user is appropriate on your system. (You can determine what user:group MySQL is using on your system by looking at the log files, typically <code>/var/log/mysql</code>. |
Latest revision as of 02:04, 25 December 2018
Recovering / Setting passwords
A lot of the instructions online for doing this no longer work with 5.7. The following is true for version 5.7.24-0ubuntu0.18.04.1
Obsolete instructions:
- Mysql (MariaDB 10.0.29): Set root password, but still can login without asking password?: the SQL command for changing passwords is different
- SET PASSWORD is deprecated, but may work
- ALTER USER is preferred.
- BUT that won't work when grant tables are skipped; you have to use
update user set authentication_string=PASSWORD("new_password") where User='root';
- Setting, Changing And Resetting MySQL Root Passwords
- default value for --skip-grant-tables is now FALSE, so you have to specify
--skip-grant-tables=TRUE
- default value for --skip-grant-tables is now FALSE, so you have to specify
Also, you may need to create the /run/mysql
folder and chown it to mysql:adm
or whatever user is appropriate on your system. (You can determine what user:group MySQL is using on your system by looking at the log files, typically /var/log/mysql
.