Environment:
Windows 2003/2007/2008/2010 X86
method/Step:
1. Download Mysql-5.6.17-win32; official website: http://dev.mysql.com/downloads/
2. Extract to the custom directory, the demo address is D:\tools\mysql\
3. Copy the My-default.ini under the root directory and change the name to My.ini,my.ini replace with the following content
#以下是复制内容, it's not a copy.
[Client]
port=3306
Default-character-set=utf8
#客户端字符类型, consistent with the service side, recommended UTF8
[Mysqld]
port=3306
Character_set_server=utf8
#服务端字符类型, it is recommended that UTF8
Basedir=d:\tools\mysql
#解压根目录
Datadir=d:\tools\mysql\data
#解压根目录 \data
Sql_mode=no_engine_substitution,strict_trans_tables
[Winmysqladmin]
D:\tools\mysql\bin\mysqld.exe
#解压根目录 \bin\mysqld.exe
#以上是复制内容, it's not a copy.
4. Environment variable Configuration
My Computer-Properties-advanced-environment variables-new
Variable Mysql_home value D:\tools\mysql
Find the variable path edit, add it at the back;%mysql_home%\bin
5.MySQL Installation
run the input cmd, or locate the C:\Windows\System32\cmd.exe, and go to the MySQL decompression directory bin subdirectory,
C:\Documents and settings\administrator>cd\
C:\>d:
D:\>CD Tools
D:\TOOLS>CD MySQL
D:\TOOLS\MYSQL>CD bin
D:\tools\mysql\bin>
D:\tools\mysql\bin>mysqld-install
Tip: Service successfully installed. And the installation is successful.
(
CMD command: cd\ returns the root directory
D: Enter D drive
CD tools into the Tools folder
)
6. Start, stop, and move out of the MySQL service
Start MySQL service: net start MySQL
Stop MySQL service: net stop MySQL
Move out of MySQL service: mysqld-remove
The service is started here to facilitate next steps.
7. Change the root password:
enter CMD in the run, jump to the installation directory/bin,
D:\tools\mysql\bin>mysql-uroot
Mysql>show databases;
Mysql>use MySQL;
Mysql>delete from User where user= "";
Mysql>update User Set Password=password (' NewPassword ') where user= ' root ';
Mysql>flush privileges;
mysql>quit;
FLUSH privileges: Force MySQL to reload permissions and take effect immediately
At this point you can log in with the following command:
D:\tools\mysql\bin>mysql-uroot-p
Enterpassword:newpassword
8: Common Commands
mysql>show databases; Show All Tables
Mysql>use MySQL; Switch to table MySQL
Mysql>show tables; Show the structure of a table
Precautions
Mysql-5.6-win32 Install-free version configuration