MySQL Database installation configuration

Source: Internet
Author: User
Tags mysql download

  1, download MySQL

Open MySQL's official website www.mysql.com, found a downloads

Click on it, go to the MySQL download page, there is a MySQL Community Edition at the bottom of the page, and there is a blue link below

Click on this blue link to go to the community version, which is the free version of the download page, MySQL Community downloads under the words of a MySQL Community Server (GPL),

Click on it, or click on the download below to really go to the MySQL download page, swipe down on the page, see, select the operating system and its version, click on the arrow on the right to select it,

I am a 64-bit window system, so make the above choice, select OK, you will see the following will be a partial refresh, and then appear suitable for our operating system version

Select one, click on the right side of the download button to download, it will jump to a page to let you register, if you want to login or register, click on the page two large buttons, if you do not want to register, swipe down the page, it has a no thanks words (such as), click on it, you can download

After the download is complete, it is a compressed file, put it to the location you want to place, such as D, unzip the software to the current folder, D disk will be a more folder, such as

  2, configuring environment variables

 The configuration of the environment variables is consistent with the way Java is configured, which is to D:\mysql-5.7.20-winx64\bin the bin path of MySQL into the environment variables.

  3, MySQL configuration

  Open our extracted folder, is the Mysql-5.7.20-winx64 folder under the D disk, create a new My.ini file

Then double-click it, open it with Notepad, and enter the following

[Client]port=3306default-character-set=utf8[mysqld] # Set the installation directory for your own MySQL basedir=d:\mysql-5.7.20-winx64# Data directory set to MySQL Datadir=d:\mysql-5.7.20-winx64\dataport=3306character_set_server=utf8sql_mode=no_engine_ substitution,no_auto_create_user# Open Query Cache explicit_defaults_for_timestamp=trueskip-grant-tables

CMD Run command, complete configuration, here must run cmd as Administrator.

1. Start the cmd command window. WIN10 system, the desktop status bar has a circle (the bottom of the circle) means search, click, come Out Search box, enter cmd in the search box, out the following content

In the command prompt, right-click to come up with the following, choose to run as Administrator.

In fact, under the Win10, with PowerShell can also, on my computer, it is more convenient to start. In the desktop status bar, right-click the leftmost Start button, click Windows PowerShell (Admin), and you're ready to go.

2. In the PowerShell or CMD window, switch to the MySQL bin directory to complete the configuration.

First enter the mysqld--initialize Command, which represents initializing MySQL and generating files from the Data folder. If there is no error, it means initialization is complete.

Enter the mysqld-install command to install MySQL. If there is a service successfully installed the registration is successful because my registration is OK, so it appears, already exists.

  

Now you can finally start the server with the net start MySQL command to start the server. Shut down the server with net stop MySQL

  

MySQL Database installation configuration

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.