MySQL Database one: Install and create a Windows service

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.