Install MySQL Zip version--some pits encountered

Source: Internet
Author: User
Tags mysql client

have been used to the MySQL installation file (. exe), download a. zip version of MySQL today, the installation process encountered some problems, as follows:

1. Download the install-free zip file on the MySQL website (http://dev.mysql.com/downloads/mysql/) (Mysql-5.7.14-winx64.zip for example)

2. Unzip the zip file to the local directory, this article extracts the following directories: D:\softwares\mysql-5.7.14-winx64

3. Create a new configuration file (My.ini) to configure the character set, port, and other information to overwrite the original configuration file (My-default.ini), and of course, you can modify the default configuration file. Create a new folder data for MySQL. As follows:

Copy the following to the newly created profile, where Basedir and DataDir set the MySQL folder path:

[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory

Basedir=d:\\softwares\\mysql-5.7.14-winx64
# Set up a storage directory for MySQL database data
Datadir=d:\\softwares\\mysql-5.7.14-winx64\\data

# Maximum number of connections allowed
max_connections=200
# The default character set used by the server is UTF8
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb

Note: If Basedir and DataDir in the My.ini file do not represent the path as "\ \", the error is reported when the mysqld--initialize command is executed:

4. Enter CMD, run the console as administrator, and enter the MySQL path (D:\softwares\mysql-5.7.14-winx64\bin) to run the Mysqld install command. Note: You need to run as an administrator here, otherwise you will be prompted as follows:

5. After successful installation, the following:

Start the MySQL service, think everything OK, the result is as follows:

6. Searching online for 3534 of this error message, it is said that the Mysqld--initialize method (http://www.mamicode.com/info-detail-1150164.html) needs to be executed starting from 5.7.6. Here's how to fix it:

1) Execute the mysqld-remove command to remove the previous error installation, otherwise you will be prompted to install

2) Execute mysqld--initialize command and then execute mysqld install, then execute net start MySQL start MySQL, all OK

7. Execute "mysqladmin-u root password Password" To set the initial password, set OK to execute Mysql-u root-p Enter the password, then login to MySQL

If password settings fail: mysql password reset https://www.cnblogs.com/shianliang/p/9502605.html

8. You can set environment variables, start the cmd input mysql-u root-p password to log in to MySQL without switching to the bin directory of the MySQL installation directory,

In this article, you can set D:\softwares\mysql-5.7.14-winx64\bin to the environment variable path, and you can enter the command to connect to MySQL directly after starting cmd, as follows:

Install MySQL Zip version--some pits encountered

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.