Software Environment
Operating system: Windows x64 Enterprise Edition
Mysql:mysql-5.7.11-winx64
MySQL official website download: http://downloads.mysql.com/archives/community/can choose the historical version
Navicat for Mysql:https://www.navicat.com.cn/download/navicat-for-mysql graphical management tool
Text Editor: notepad++ https://notepad-plus-plus.org/
Environment configuration
1, download from the official website is a zip file, that is, the green version. Unzip it to a local disk, like I unzipped the C:\Tools\mysql_winx64 .
2. Add the installation directory in the system's environment variable path C:\Tools\mysql_winx64
3. Open My-default.ini in directory or copy my-default.ini rename to My.ini
4, modify the My-default.ini
default-character-set=UTF8[mysqld]=== = 3306= character-set-server=utf8
Changes compared to the original configuration:
Add a line before [mysqld] Default-character-set=utf8
Set Basedir,datadir,port
Add a row in the end Character-set-server=utf8
Command-line Installation
1, the administrator run cmd into the installation directory of the bin folder, such as mine is to enter the C:\Tools\mysql_winx64\bin
2. Enter installation instructions Mysqld-install MySQL (note: No MySQL is the installed service name, can be found in the services.msc)
3. Input initialization instruction (optional)
Mysqld--initialize-insecure (Note: Do not set the root password, in my software environment, this method after initialization, cannot modify the root password)
Mysqld--initialize (Note: Generate a random root password)
Explanation: The above instruction will generate a data directory in the installation directory, there will be some initialization files
4. Start the MySQL service command
Method One: Input directive net start MySQL
Method Two: Start in the service
View the default password
Locate the log file under data from the installation directory, either *.log or *.err (different versions), open with a text editor, search for root
For example my: A temporary password is generated for [email protected]: crr/v3y? L#cq
So this crr/v3y? L#CQ is the initialization is assigned to my temporary password, this password will be used later
Modify the default password
After locating the password created in the previous step, the administrator opens CMD and enters the installation directory input mysql-u root–p
Online to see that the first login can not lose the password, in my environment is not feasible
Enter the password at the time of creation, when you see the welcome words should understand, successfully log in to MySQL.
Input instruction set password for [email protected] = password (' root '); (Note: I set the root user's password to root)
See Query OK Word, witty we should also know OK
Connection test
Common directives
show databases; List of all databases
Create Database DbName; Create a database
Use DbName; Select Database
Show tables; Display a list of data tables
Back in school, I used navicat for MySQL to manage the database, so this time it's not going to be that small.
Resources
Http://jingyan.baidu.com/article/e3c78d64b44ef53c4c85f51a.html
MySql5.7.11 WINDOW10 Ultra-Detailed installation tutorial
Http://jingyan.baidu.com/article/37bce2be7e14b01003f3a27e.html
http://blog.csdn.net/mcjentor/article/details/47376601
Http://jingyan.baidu.com/article/148a1921ab75d04d71c3b1b5.html
MySQL 5.7.x Configuration Tutorial