MySQL database installation and creation of Windows services
1. Download the compressed package (Mysql-5.7.18-winx64.zip) before moving to the corresponding directory (such as D:\software) and unzip it.
2. Install the server:
Mysqld: With D is a service-side program
D:\> D:\software\mysql-5.7.18-winx64\bin\mysqld--initialize-insecure (console is best to start in Administrator mode)
At this point, we have initialized the service-side program, and created the initial user root password null,
The initial program created the data directory for us under the D:\software\mysql-5.7.18-winx64 directory
3. Start the service side:
D:\> D:\software\mysql-5.7.18-winx64\bin\mysqld
4. Start the Client connection:
D:\> D:\software\mysql-5.7.18-winx64\bin\mysql-u Root-p Enter after running, prompt for password to enter again directly,
Hint: Type ' help; ' or ' \h ' to help. Type ' \c ' to clear the current input statement. Indicates that the installation was successful.
can execute show databases; show current directory;mysql> show databases;
Create database db1; creating a Directory
5. Add the path directory:
Pass
Once added, you can start the service side directly mysqld the console, Mysql-u root-p start the client
6. Create a Windows service, you can resolve the startup service after the console hang, you can start automatically run.
Open cmd as Administrator
Run D:\software\mysql-5.7.18-winx64\bin\mysqld--install to install successfully
NET start MySQL start server
NET stop MySQL shutdown server
MySQL Database one: Install and create a Windows service