After installation, start the service net start mysql, which cannot be started. The log reports an error. Some system tables, mysql.user and other tables are missing
Solution:
Execute under Bin: mysqld — initialize execute — user = MySQL
After execution, generate the directory C: \ program files \ MySQL \ MySQL server 5.7 \ data. Create a new root user without a password
mysqladmin – u root password 123456, specify the root user password
ps:
Net start MySQL
net stop MySQL
mysqld — install, install services on windows, mysqld — remove remove remove services
Mysqld — console start printing log
mysqladmin – uroot shutdown stop service
Here is the most important thing to pay attention to. When installing MySQL service, you must switch to the bin directory of MySQL installation directory, no matter whether you configure environment variables or not, otherwise the above error will be reported when starting the service after installation
Similar Posts:
- [Solved] MYSQL8 Error: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- MySQL installation error — failed to find valid data directory
- MySQLAccess denied for user ‘root’@’localhost’ [How to Solve]
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- [Solved] MYSQL Install and Login Error: Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- Solution to the error of MySQL: unrecognized service (CentOS)
- How to Solve MYSQL error “no directory, logging in with home = -“
- Solve the problem of unknown column ‘password’ in ‘field list’ in MySQL
- After installing mysql, centos7 can’t start the service, and prompts unit not found