MySQL compressed version installation configuration, mysql compressed installation Configuration

Source: Internet
Author: User

MySQL compressed version installation configuration, mysql compressed installation Configuration

Install and configure Mysql

 

1) modify the mysql configuration file

The default profile for mysql-5.7.11 is in mysql/my-default.ini, Or you create a my. ini file yourself

Bytes ----------------------------------------------------------------------------------------------

My. ini references


[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

Bytes --------------------------------------------------------------------------------------------

 

2) Configure Environment Variables

Bytes --------------------------------------------------------------------------------------------

Configure the bin directory path of mysql to path (not detailed)

Bytes --------------------------------------------------------------------------------------------

 

3) install mysql

Bytes --------------------------------------------------------------------------------------------

Open cmd and run:Mysqld-install

Run services. msc. Check that there is indeed a service named MySQL.

Bytes --------------------------------------------------------------------------------------------

 

4) initialize the data directory

Bytes --------------------------------------------------------------------------------------------

Open the mysql installation directory. If there is no data folder, enter:Mysqld -- initialize-insecure

Generate a user data with the root user name and empty password

Note:

Mysqld -- initializeAutomatically generate a random passwordRootUser, Unable to log on without a password.

If the data folder is not empty, the command cannot be executed. You can delete the data folder and run the preceding command again.

Bytes --------------------------------------------------------------------------------------------

Enter select version () in mysql to view mysql version information.

 

5) Enable the mysql service and log on to set the password

Bytes -------------------------------------------------------------------------------------------

Start mysql Service

Cmd input:Net start mysql

Log on to mysql

Cmd input: mysql-u root-p

Password: Press enter here.

Set Password

Set password for root @ localhost = password ('new password ');

Bytes ------------------------------------------------------------------------------------------

For details, refer:

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

 

How to delete MySQL

1) Close the service

Net stop mysql

2) delete a service item

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

3) Delete the corresponding folder.

 

 

 

 

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.