Mysql5.7-Free installation version of the Jump pit test

Source: Internet
Author: User
Tags mysql in mysql login

1, first unpack the package, I extracted to the E:\install_work\mysql directory:

2, found that the MySQL root directory does not have the data directory and the My.ini file, it does not matter, when initializing the MySQL system will automatically create a data directory, we just need to create a My.ini file.

Create a new Notepad and copy the following code into Notepad:

[Client]

port = 3306

[mysqld]

#设置3306端口

port = 3306

# 设置mysql的安装目录

basedir=E:\install_work\mysql

# 设置mysql数据库的数据的存放目录

datadir=E:\install_work\mysql\data

# 允许最大连接数

max_connections=200

# 服务端使用的字符集默认为8比特编码的latin1字符集

character-set-server=utf8

# 创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

[mysql]

# 设置mysql客户端默认字符集

default-character-set=utf8


以上为my.ini的初始数据  我修改了端口号。 basedir  datadir的路径。

放到了本地的解压目录下

3. Initialize MySQL, search cmd find command prompt, right-click to Run as Administrator, go to the Bin directory and enter the following command:

Mysqld--initialize--user=mysql--console


After the initialization succeeds, the system creates the data directory under the MySQL directory and generates the initial password.

To prevent loss, we will first save the password to the text.

4. Install MySQL by entering the following command:

Mysqld--install MySQL

Displays the service successfully installed. Indicates that the installation was successful.


5. Start MySQL by entering the following command:

net start MySQL

If startup fails, you can find MySQL in the computer service right click to manually start the MySQL service

6. Enter the following command to log in to MySQL:

Mysql-p3306-u Root-p, enter the initial password, copy the initial password, click the right button to paste.


7, modify the MySQL login password, enter the following command (note to enter a semicolon)

Set Password=password (' New password ');


Do not put the environment variable first. Since there is already an installed version of MySQL, it is because the environment variable information is used again, the status of the current content has not been used


Once configured, you can log in to MySQL with your new password next time.

Problems that you may encounter

1, input mysqld--initialize--user=mysql--console appears:

Unable to continue executing code because the system cannot find MSVCR120.dll. Reinstalling the program may resolve this issue

Unable to continue executing code because the system cannot find MSVCP120.dll. Reinstalling the program may resolve this issue

Solution :

Download the DirectX Repair Tool enhanced version, reference address: http://blog.csdn.net/vbcom/article/details/7245186


The above excerpt from https://www.cnblogs.com/qjoanven/p/7898006.html, slightly modified

Mysql5.7-Free installation version of the Jump pit test

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.