After Windows10 installation service and no Mysql not start Solution

One problem encountered install / remove the mysql installation process of the Service Denied, this problem did not explain their right to install and remove, because he is not running as administrator cmd during operation, the solution: that is, as an administrator run cmd, and then install it

 

step:

1, hit my computer C: \ Windows \ System32 \ cmd.exe, right-click cmd select Run as administrator

2, in performing the command window dos cd e: \ workspace \ \ lib next to the bin directory mysql-5.6.24-win32, mysql -install execute command; last successful installation

 

 

win10 system with compressed zip format to install MySQL database, switch to the bin directory in the MySQL command line (administrator), the
registration service with MySQL mysqld -install, starting with the net start mysql MySQL service can not start prompt, concrete phenomenon in the following figure:

Solution

First, use mysqld -remove to delete MySQL service 
. Generally downloaded from the official website of MySQL zip archive, after decompression is not my.ini this configuration
file, this time need to manually create the installation package file to the directory, as follows:

[mysql]
default-character-set=utf8
[mysqld]
port=3306
basedir=E:\developer\mysql\mysql-5.7.21-winx64\mysql-5.7.21-winx64
datadir=E:\developer\mysql\mysql-5.7.21-winx64\mysql-5.7.21-winx64\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB

 


Which datadir need to manually create a new;

Mysql --console then use the command line to see the error message

Here you can see a small table a mysql.plugin, this time to make their own new, use mysqld --initialize --user command line = mysql --console
will create a new table after this, at this time there will be a default passwords to remember, later to enter the mysql command line to modify the password.
Finally, you can start the service with net start mysql up

If you need to change a password, then start the service using the command line mysql -u root -p, the default password to be entered before landing, enter the mysql
command line with set password = password ( 'password to set') that is You can change the password!

Guess you like

Origin www.cnblogs.com/nhdlb/p/11568595.html