Install, configure, and start MySQL under Win10

Source: Internet
Author: User
Tags mysql client

1. Download http://dev.mysql.com/downloads/mysql/

2. Community > MySQL Community Server

3. Other Downloads: > Windows (x86, 32-bit), ZIP Archive

5, decompression Mysql-5.7.11-winx64.zip, decompression in D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64

6, in the D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64 directory to create a new My.ini file, the setup code is as follows:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\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
#log-error=d:\mysql\mysql_log_err.txt
#log =d:\mysql\mysql_log.txt
#log-bin=d:/log/mysql/mysql_log_bin
#log-slow-queries= D:\mysql\mysql_log_slow.txt


7. Install MySQL service, execute cmd as Administrator,

C:\windows\system32>d:

D:\>CD D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin

D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin>mysqld Install (uninstall with Mysqld-remove)
Service successfully installed.

D:\soft\mysql-5.7.11-winx64\mysql-5.7.11-winx64\bin>

8. Start the service net start MySQL on the local computer after the service starts to stop. Some services stop automatically when they are not being used by other services or programs.
Switch to the old version of MySQL D:\soft\mysql_5.6.24_winx64\mysql-5.6.24-winx64
Start, prompt: Windows cannot start the MySQL service (located on the local computer). Error 1067: Process terminated unexpectedly
Windows Management > Time Viewer > Automatic View > Summary Page event prompt:
Can ' t find messagefile ' d:\ oft\mysql_5.6.24_winx64\mysql-5.6.24-winx64\share\errmsg.sys '

For more information, see Help and Support Center at http://www.mysql.com.
D:\soft\ is identified as D:\ oft\
Modify the MySQL file storage location D:\mysql
To set the configuration file My.ini file:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\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
#log-error=d:\mysql\mysql_log_err.txt
#log =d:\mysql\mysql_log.txt
#log-bin=d:/log/mysql/mysql_log_bin
#log-slow-queries= D:\mysql\mysql_log_slow.txt

and copy the D:\mysql\my.ini file to C:\Windows below, start MySQL successfully

9, set the environment variable: D:\mysql\bin;
10, set the password, the new installation root is no password, mysql-u root into MySQL, execute the statement: Set password = password (' 123456 ');
C:\users\alex>mysql-u Root
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server version:5.6.24 MySQL Community Server (GPL)

Copyright (c), Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

mysql> Set Password = password (' 123456 ');
Query OK, 0 rows affected (0.02 sec)

Mysql>

Install, configure, and start MySQL under Win10

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.