Detailed Mysql database installation and password configuration _mysql

Source: Internet
Author: User

MySQL was developed by MySQL AB and acquired by Oracle Company

MySQL is a relational database management system

Divided into Community Edition and Enterprise Edition

The SQL language used by MySQL is the most commonly used standardized language for accessing databases, with its small size, speed, and low TCO, especially with the features of open source, with PHP and Apache to form a good development environment

Installation method:

Installation mode MSI installation and zip installation

Typical: Typical installation recommended use

Custom: Customizing the Installation

Complete: Fully Installed

A. Download MySQL software

1. Download MySQL software to Oracle website

First to MySQL's official website, click Download, recommended to use the Community version of the download http://dev.mysql.com/downloads/

2. Find MySQL Community Server, at the bottom of the selected download version, see you are Linux version or Windows version ,64 or 32 bits , which The "X86" here refers to 32 digits .

Two versions: Zip is a software-free package, MSI is a Microsoft-specific compression format and is a package that needs to be installed

MySQL ZIP Archive: Compact version, you need to configure your own

MySQL MSI Installer: Installation version, automatic configuration during installation

Install MSI Memory is relatively small, the individual download is a zip, which optional

3. Click Download (download)

The general default download is 5.7 version, you can also select the other version

4. Eject the following interface, is to you login username and password, you can directly skip click No, just start my download. Download

When the download is complete, prepare for the installation before installing

1. Renaming

after extracting the downloaded version, rename it to MySQL if installed in E disk: E:\mysql

Meanwhile, rename the file my-default.ini in MySQL to My.ini .

3. Configuration of environment variables

Right-click on my Computer or computer--> Click Properties--> Select Advanced System settings--> Click Environment variable--> find path in system variable (S), click Edit or double click it

Then add a half-width semicolon to the path below, and then assign the bin path in MySQL, and then click OK when you're done.

To configure the environment's attention points:

Be sure to copy to bin path such as:; E:\mysql\bin;

Must be added later, rather than overwriting the path of the original file

Be sure to add a half-width semicolon before adding the path to make it easier to differentiate from the previous path

The following is installed with the cmd command mysql

4. Click on the lower left corner of the Windows icon, enter cmdin the search box, and then right click to run as an administrator

5. In cmd, enter the command to install MySQL

First, the default is to install in the C disk, install it in the E-disk

Drive letter Toggle : Drive letter +: switch to E-disk-->e: Enter

go to file path : CD + file path such as: CD \mysql \ Bin carriage return

install MySQL: mysqld-install

start MySQL: net start mysql if the boot error, may be a problem with the configuration of the MySQL environment, can not find the path to the file, this time to reconfigure, after the start of success, to perform the next step

enter MySQL:mysql-u root-p

Enter, then prompt "Enter password:" Statement, do not care about it, direct return, because the first time you install MySQL default is no password, and then login successfully.

Setting of the 6.MySQL password

For security reasons, set the MySQL password: Enter update mysql.user set Password=password (' 123456 ') where user= ' root '; Enter (remember the end of the entry with a semicolon)

If you are modifying the root password: UPDATE mysql.user SET password=password (' New password ') WHERE user= ' root '; After the modification is successful, you can use the log out again

Oracle offers MySQL for free, so it's a little hard to install, but it's easy to know the steps to install it.

If you still don't understand, recommended links: http://jingyan.baidu.com/article/09ea3ede0706eac0afde3962.html

The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring some help, but also hope that a lot of support cloud Habitat community!

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.