WINDOWS10 under the MySQL5.7.18 version installation process and the problems encountered

Source: Internet
Author: User
Tags mysql client

WINDOWS10 under the MySQL5.7.18 version installation process and the problems encountered

Mysql-5.7.18-winx64 Installation


1. Unzip

This time MySQL is installed in the H disk, according to personal preference can also be installed in the d:/e:/f: disk.

2. Create the data empty folder in the Unzip directory

3. Place the following information in the new text file My.ini
Create a new text file My.ini, and fill in the information:


#代码开始
[Client]
#设置3306端口
Port = 3306

[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=e:\mysql-5.7.19-winx64\mysql-5.7.19-winx64
# Set up a storage directory for MySQL database data
Datadir=e:\mysql-5.7.19-winx64\mysql-5.7.19-winx64\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
Sql_mode=no_engine_substitution,strict_trans_tables

[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
#代码结束

Note Change the installation directory and the storage directory to the appropriate directory for your own machine.
Because the installation directory of this machine is on the H drive, the directory path is in the H drive.

4. New File Save path

The new My.ini file is placed in the C:\Windows\System32 folder
(Previously the My.ini was created directly in data and then copied to the C:\Windows\System32 folder, but later found that the My.ini in data was useless).

5. Configure Environment variables
Right-click "This PC"-Select "Properties"
Go to "Advanced system Settings"-"advanced"-Set "environment variables"

New system Variable
Variable name set to Mysql_home
Variable value is the extracted MySQL folder path

6. Open the WIN10 terminal as an administrator
The usual window keys +r open terminals do not have administrator privileges.

Need to C:\Windows\System32, find cmd.exe-Right-click-Run as Administrator.

                                                                                

Switch to the MySQL installation bin directory:

Run the following command:
--Registration Service
Mysqld--defaults-file=my.ini--initialize-insecure
--Installation
Mysqld--install
--Start service
net start MySQL
--Installation Start-up

However, this machine runs the last instruction net start MySQL and does not start successfully ...


7. Pop-up Error box

8. Reopen the page that configures environment variables
Edit the path system variable, add%mysql_home%\bin to the end of the path variable, semicolon, or delimiter.

9. Try the command input again

Switch to the MySQL bin directory as an administrator again, follow the command line in 6th above, and then enter the instructions to continue the error.

Mysqld--install
--Start service
net start MySQL
--Installation Start-up


10. Prepare the required documents

Follow the great God tutorial, go to the C:\Windows\System32 directory, find the MSVCR120.dll file, My computer also found Msvcr120_clr0400.dll this file, so copy a copy and then copy the file Change the name to Msvcr120.dll.
At the same time also need to msvcp120.dll this file, the installation directory under the Bin folder does not, and so on.
Some computers may install some kind of program, there is no hint. Because these files already exist.

11. Re-enter (in item sixth above) Directive:
Mysqld--install
--Start service
net start MySQL
--Installation Start-up

Service is starting ... The next line remains: The service failed to start.
Locate the data directory under the H:\MySQL\MYSQL\mysql-5.7.18-winx64\data installation directory and open the log file at the end of the. Err.

The error message is as follows:

12. Preparation of database initialization

At this point, you need to initialize the database, delete the data directory will be an error, and will be newly created and placed in the C:\Windows\System32 folder in the My.ini file, copy, into the bin folder.

13. Initializing the database
Command line execution: mysqld--initialize--user=mysql--console Build the library, the last line of the temporary password to note, the subsequent login needs to use ([email protected]: temporary password).

14 starting the service
net start mysql----start MySQL service
If you do not run the service, enter the command directly: Mysql-u root-p into MySQL, will error:

and the password needs to be entered manually (temporary password), the local copy is not valid, the second time manually entered the successful login.

15. Change the password
Enter the command under MySQL: set password for [email protected] = password (' new password ');

MySQL exit instructions

MySQL Exit command has three kinds: 1) \q;

2) exit;

3) Quit;

RELATED Links:
https://jingyan.baidu.com/article/363872ec18211d6e4ba16fc5.html
https://jingyan.baidu.com/article/363872ec18211d6e4ba16fc5.html

WINDOWS10 under the MySQL5.7.18 version installation process and the problems encountered

Large-Scale Price Reduction
  • 59% Max. and 23% Avg.
  • Price Reduction for Core Products
  • Price Reduction in Multiple Regions
undefined. /
Connect with us on Discord
  • Secure, anonymous group chat without disturbance
  • Stay updated on campaigns, new products, and more
  • Support for all your questions
undefined. /
Free Tier
  • Start free from ECS to Big Data
  • Get Started in 3 Simple Steps
  • Try ECS t5 1C1G
undefined. /

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.