MySQL Compressed edition installation configuration

Source: Internet
Author: User

Installation and configuration of MySQL

1) MySQL configuration file modification

mysql-5.7.11 default profile is in Mysql/my-default.ini, or create a My.ini file yourself

----------------------------------------------------------------------------------------------

My.ini reference Content


[mysqld]
Basedir= "D:/program files/mysql-5.7.15-winx64"
Datadir= "D:/program Files/mysql-5.7.15-winx64/data"
port=3306
Default-character-set=utf8
Default-storage-engine=innodb
Character_set_filesystem=binary

[Client]
port=3306
Default-character-set=utf8

[MySQL]
Default-character-set=utf8

--------------------------------------------------------------------------------------------

2) Configure Environment variables

--------------------------------------------------------------------------------------------

Configure the MySQL bin directory path to path (not specifically described)

--------------------------------------------------------------------------------------------

3) Install MySQL

--------------------------------------------------------------------------------------------

Open cmd, run: mysqld-install

Run Services.msc A look, there really is a service called MySQL

--------------------------------------------------------------------------------------------

4) Initialize the data directory

--------------------------------------------------------------------------------------------

Open the MySQL installation directory, and if there is no Data folder, enter it in cmd:mysqld--initialize-insecure

Generate a user data with root as the user name and a blank password

Attention:

mysqld--initialize automatic generation of random passwords Root User , You cannot log on without a password .

The Data folder is not empty and cannot execute this command. You can delete the Data folder and re-execute the step-up instruction

--------------------------------------------------------------------------------------------

Enter select version () in MySQL to view MySQL version information

5) Turn on the MySQL service and login to set the password

-------------------------------------------------------------------------------------------

Start the MySQL service

CMD input:net start MySQL

Log in to MySQL

CMD input: Mysql-u root-p

Password: Press ENTER directly here

Set Password

Set password for [email protected] = password (' new password ');

------------------------------------------------------------------------------------------

Specific reference:

Http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html

How to remove MySQL

1) Close the service

net stop MySQL

2) Delete Service items

C:\mysql\bin\mysqld-nt.exe-remove

3) Delete the corresponding folder

MySQL Compressed edition installation configuration

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.