Mysqlgreen version (install the image and text tutorial of the zipdecompressed version (mysql-5.6.22-win32.zip), and download the mysql5.6 green version

Source: Internet
Author: User
Tags change settings dedicated server

Mysqlgreen version (install the image and text tutorial of the zipdecompressed version (mysql-5.6.22-win32.zip), and download the mysql5.6 green version

1. database download

Official Mysql Website: http://www.mysql.com/, data warehouse: http://www.mysql.com/downloads /. You can find two types of file packages on the official website: exe and zip. I like the refreshing method, so I downloaded the ZIP package. The latest version 5.6.22 is about 350 M. You need an oracle account to download the latest version. You have registered an oracle account.
 

2. Database Installation

Extract the downloaded file mysql-5.6.22-win32.zip (with x86 and x64 versions) to any directory to prevent unknown issues. It is best to put it in a non-Chinese directory of a non-system disk, my location C: \ Program Files \ mysql-5.6.22-win32. Open the folder and copy a configuration file with the my-default.ini my. ini.

Open the my. ini file and modify the configuration as follows:

# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** do not edit this file. it's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. start at 70% of total RAM for dedicated server, else 10%. innodb_buffer_pool_size = 128 M # 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 root directory basedir = "C: \ Program Files \ mysql-5.6.22-win32" # data file storage directory datadir = "C: \ Program Files \ mysql-5.6.22-win32 \ data "# port = ..... port, default 3306 # server_id = ..... unique Identifier 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 = 128 M # sort_buffer_size = 2 M # bytes = 2 M SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES # character-set-server = utf8 [client] # client encoding method, it is best to save the same loose-default-character-set = utf8 [WinMySQLadmin] Server = "C: \ Program Files \ mysql-5.6.22-win32 \ bin \ mysqld.exe"

For more optimized my. ini configuration files, refer to this article: http://www.bkjia.com/article/84357.htm

In order to ensure the normal operation of the service, the preceding settings adjust the parameters as needed and restart the service after modification.

3. register the Mysql Service

Start -- run -- cmd, then cd to the bin of the mysql installation directory, my directory is "C: \ Program Files \ mysql-5.6.22-win32 \ bin", and then execute mysqld-install, prompt that the service is successfully installed! Run services. msc. Check that there is indeed a service named MySQL, and start it. Sometimes startup fails. You can adjust the parameters as needed.
The installation of mysql is complete, but it is quite simple. However, if no operation is performed, the whole process is estimated to take a lot of time, which is also a necessary process for growth.

4. log on to and maintain Mysql

The installation is successful and started. How can I log on? What is the user name and password?

The default username of MySQL is root, and the password is blank.

How to log on? Start -- run -- cmd, cd to the bin directory, and then execute "mysql-u root-p", prompting you to enter the password. Because the password is blank for the first time, you can press enter directly.

Set a password for the database. Enter exit to log out. Run C: \ Program Files \ mysql-5.6.22-win32 \ bin \ mysqladmin-uroot-p password <new password>, replace <new password> with your custom password, and press Enter. The system will prompt you to enter the password, which actually refers to the original password. Because the original password is empty, you can press enter to complete the settings. Then, log on to mysql with the above method and new password to work properly.

Run "show variables like '% version %'" To view database information.

  

So far, the entire database has been installed.

Although the mysql client can complete all database operations, the black command line interface is still daunting for many people and the learning curve is rising. Here we recommend a tool Navicate for mysql, I personally feel very easy to use, various operations are clear at a glance, and SQLyog is also good.

  

 

5. enable remote Logon

After mysql is installed, you can only log on to the Local Machine (that is, localhost) by default. You need to enable remote logon to make it easy to use. There are many ways to enable it.

X: \> mysql-u root-p password // log on to the mysql System> use mysql; // switch the database to mysql> update user set host = '%' where user = 'root'; // an ERROR 1062 (23000) occurs sometimes in the above sentence ): duplicate entry '%-root' for key 'primary' // However, You can query the user table and find that a record has been updated. In the following example, mysql> select host, user from user; // execute this statement directly, in fact, to refresh the permission mysql> flush privileges;

Test the remote connection.

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.