1, Database Download
From the official website can find two kinds of packages, one is EXE installer, the other is a zip compression package.
I like the refreshing way, so the download is a zip compression package. The newest 5.6.22 is about 350M, download also need Oracle account number, register a good.
2. Database Installation
Extract the downloaded file Mysql-5.6.22-win32.zip (there are x86 and x64 two versions) to any directory, to prevent unknown problems, preferably on the non-Chinese directory of the system disk, my location E:\mysql\mysql-5.6.24-win32. Open the folder to copy a configuration file that is My-default.ini as My.ini.
Open the My.ini file and modify the related configuration as follows
# for advice on I-change settings, please, please. # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults . HTML # * * * does not EDIT this FILE. It's a template which'll be copied to the # * * * * * * * * * * * * * * * * * * location during install, and'll be replaced
Rade to a newer version of MySQL. <strong>[</strong>mysqld<strong>]</strong> # Remove Leading # and set to the amount's RAM for th E Most important data # cache in MySQL.
Start at 70% all RAM for dedicated server, else 10%. Innodb_buffer_pool_size = 128M # Remove Leading # to turn on a very important data integrity Option:logging # changes T
o The binary log between backups.
# Log_bin # These are commonly set, remove the # and set as required. #mysql根目录 basedir = "E:\mysql\mysql-5.6.24-win32" #数据文件存放目录 datadir = "E:\mysql\mysql-5.6.24-win32\data" # port = ..... Port, default 3306 # server_id = ... Unique identification of the service instance # Remove leading # To set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast selects.
# Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=no_engine_substitution,strict_t Rans_tables #服务端的编码方式 Character-set-server=utf8 <strong>[</strong>client<strong>]</strong > #客户端编码方式, the best and the service side to save the same loose-default-character-set = UTF8 <strong>[</strong>winmysqladmin<strong >]</strong> Server = "E:\mysql\mysql-5.6.24-win32\bin\mysqld.exe"
The above set up in order to ensure the normal operation of the service, according to their needs to adjust the parameters, modify to restart the service.
3, registered MySQL service
Start-run--cmd (cmd to open with Administrator privileges), and then CD to the MySQL installation directory under the bin, my directory is "E:\mysql\mysql-5.6.24-win32\bin", and then execute Mysqld-install, Prompt Service installation Success! Run Services.msc A look, there really is a service named MySQL that starts it up. Sometimes the startup fails, and the parameters are adjusted according to the situation.
Here MySQL installation is completed, in fact, quite simple, but if there is no operation, the whole process is estimated to spend a lot of time, but also the process of growth must.
4, login to maintain MySQL
The installation was successful, also started, how to log in AH? What is the username and password?
The default username for MySQL is root and the password is blank.
How do I log in? Or start-run--CMD,CD to the bin directory, and then execute "mysql-u root-p", prompted to enter the password, because the first run, the password is empty can be directly enter.
Let's set a password for the database. Enter exit Exit login. Then run C:\Program files\mysql-5.6.22-win32\bin\mysqladmin-uroot-p Password < new password >, replace < new password > with your custom password, and then press ENTER. At this point will be prompted to enter the password, in fact, refers to the original password, the original password because it is empty, so here and then enter to complete the setup. Then use the above method and new password login to MySQL, you can work correctly.
Run "show variables like '%version% ';" View database related information
This completes the installation of the entire database.
Although the MySQL client can complete all about database operation, but the Black command line interface or let a lot of people, learning curve straight up, here to recommend a tool navicate for MySQL, personal feeling very easy to use, a variety of operations at a glance, There is a sqlyog also good.
The above is a small set to introduce the MySQL5.6.22 green version of the detailed tutorial, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!