MySQL green version (zip uncompressed version) of the installation Graphics tutorial (mysql-5.6.22-win32.zip) _mysql

Source: Internet
Author: User
Tags change settings mysql client win32 dedicated server

1. Database download

MySQL official website: http://www.mysql.com/, database download address: http://www.mysql.com/downloads/. 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 files mysql-5.6.22-win32.zip (there are x86 and x64 two versions) to any directory, to prevent unknown problems, preferably in a non-Chinese directory of the system disk, my location C:\Program files\ Mysql-5.6.22-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 the "How to" change settings, please the # 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

De to a newer version of MySQL. [Mysqld] # Remove Leading # and set to the amount's RAM for the 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 to
The binary log between backups.
# Log_bin # These are commonly set, remove the # and set as required. #mysql根目录 basedir = "C:\Program files\mysql-5.6.22-win32" #数据文件存放目录 datadir = "C:\Program files\mysql-5.6.22-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 transactionsAnd 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_tra Ns_tables #服务端的编码方式 Character-set-server=utf8 [client] #客户端编码方式, preferably with a server-side save consistent loose-default-character-set = UTF8 [ Winmysqladmin] Server = "C:\Program Files\mysql-5.6.22-win32\bin\mysqld.exe"

If you need a more optimized My.ini configuration file, refer to this article: http://www.jb51.net/article/84357.htm

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, then CD to the MySQL installation directory under the bin, my directory is "C:\Program Files\mysql-5.6.22-win32\bin", and then perform mysqld-install, prompts the 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% '" To 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.

  

5, open remote login

MySQL installation is completed by default only this machine (is localhost) login, we need to open telnet to facilitate the use. Open method There are many, Baidu a lot, I said the test pass method

X:\>mysql-u root-p Password  //Login system
mysql> use MySQL;    Switch database
mysql> Update user set host = '% ' where user = ' root '; 
The above sentence sometimes appears a mistake error 1062 (23000): Duplicate entry '%-root ' for key ' PRIMARY '

//But then you check the user table found that a record has been updated, the following sentence
mysql> Select Host, user from user;

The direct execution of this sentence, in fact, is refreshing permissions
mysql> flush privileges;

Try the remote connection again, it's done.

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.