Install and configure MySQL (5.6.20) under Windows

Source: Internet
Author: User
Tags change settings dedicated server

1. First download the Windows edition mysql5.6 free install ZIP package to http://dev.mysql.com/. Then extract the zip package to D:\mysql-5.6.20-winx64.

2. Copy the My-default.ini under MySQL and create the My.ini in the same directory. My.ini is the configuration for MySQL. The simplest configuration:

1 basedir=d:/mysql-5.6.20-winx642 datadir=d:/mysql-5.6.20-winx64/data
Base config

My configuration is:

1 # for advice the change settings2# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html3 # * * * Don't EDIT this FILE. It ' s a template which 'll be copied to the4# * * * default location during install,and would be replaced if you5 # * * * * Upgrade to a newer version of MySQL.6 7 [mysqld]8Character-set-server=UTF89 Ten # Remove Leading # and set to the amount of RAM for the most important data One# Cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%. A# innodb_buffer_pool_size =128M -  - # Remove Leading # to turn on a very important data integrity Option:logging the # Changes to the binary log between backups. - # Log_bin -  -# These is commonly set,Remove the # and set as required. +# Basedir = ..... -# DataDir = ..... +# port = ..... A# server_id = ..... atbasedir=d:/mysql-5.6.20-winx64 -datadir=d:/mysql-5.6.20-winx64/data -port=3306 -  -Character-set-server=UTF8 -Default-storage-engine=INNODB ininnodb_data_home_dir=d:/mysql-5.6.20-winx64/data -Innodb_data_file_path=Ibdata1:12m:autoextend toinnodb_log_group_home_dir=d:/mysql-5.6.20-winx64/data +  -Innodb_buffer_pool_size=512M the # Remove Leading # To set options mainly useful for reporting servers. * # The server defaults is faster for transactions and fast selects. $# Adjust sizes as needed,experiment to find the optimal values.Panax Notoginseng# join_buffer_size =128M -# sort_buffer_size =2M the# read_rnd_buffer_size =2M +  A# Sql_mode=no_engine_substitution,strict_trans_tables
My.ini

3. Set the environment variable path. Add D:\mysql-5.6.20-winx64\bin to path.

4.CMD below try to start mysqld, and the background log output on the screen.

5. Register MySQL for Windows service. You can later use Windows service to install Mysqld and uninstall MYSQLD services.

6. Go to Service Manager

7. Start the MySQL service

8.net start MySQL start MySQL service, net stop MySQL stop MySQL service

9. You can also turn off the MySQL service using the mysqladmin command.

10. Log in to the MySQL database using the root user

11.show databases; show all databases

12. Change the login password of the root account 1234:

13. Create a database to specify the Chinese encoding method

There are also some commands for testing MySQL installation:

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.