install MySQL5.7 initialization failed
stay mysql install After the command runs successfully , Then run mysqld –initialize The command completes the database initialization function , This is the encounter with error: Found option without preceding group in config file: /data/3307/my.cnf at line: 1
reason :my.ini The file format is utf-8
terms of settlement ,my.ini The file is saved as ANSI Format file
MySQL5.7 modify root Account password
-
Go to the installation directory bin Catalog , Command line execution :
mysqld –skip-grant-tables -
Will get stuck , Don’t mind , Do not shut down. ;
-
Open a command window again in the directory , Direct input mysql, enter
-
Input use mysql; Choose to use mysql database
-
Execute statement :
update user set authentication_string=password(‘root’) where user=‘root’; -
This changes the password to root 了
Be careful : You need to close your mysql service