Last active
July 25, 2018 01:04
-
-
Save chouyang/acbd037813d88d11606e5cb9cc8572a9 to your computer and use it in GitHub Desktop.
[Initialize mysql database]Initial setup for newly install mysql instance #mysql
This file contains 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
# grep initial password for version 5.7 and above | |
grep 'temporary password' /var/log/mysqld.log | |
# reinitialize database (create database directories and system databases) | |
mysqld --initialize --console | |
# set new password (no hash function or password function called) | |
set password = 'new password'; | |
# do as it says | |
uninstall plugin validate_password; | |
# disable validate_password plugin | |
sudo vi /etc/my.cnf # add 'validate_password=off' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment