This article mainly introduces the process of installation-free configuration mysql5.6.19, the whole process of its own many mistakes, after finishing, now a successful process can be recorded for your reference.
Prepare to download the latest stable version on MYSQ official website http://dev.mysql.com/downloads/mysql/. This article uses a MySQL version of 5.6.19, because the download installs the free version, on the page select "Windows (x86, 64-bit), ZIP Archive"Spit it Out, getting bigger:217.2M】
Unzip the downloaded Mysql.zip to E:\Develop\mysql-5.6.19-winx64
Create the data directory to create the directory: E:\Develop\TestMysqlData, a table for MySQL and data-related files.
Configuration copy MySQL extract directory My-default.ini to Test.ini, the Basedir, DataDir configured as the previous MySQL directory and the data directory. and add the encoding configuration: Character_set_server=utf8, Character_set_client=utf8 after the configuration of the file as follows:
Basedir = E:/develop/mysql-5.6.19-winx64datadir = e:/develop/testmysqldatacharacter_set_server=utf8character_set_ Client=utf8
For more configuration, you can access the configuration page of the MySQL website: http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html, which is in Test.ini.
Register the service through CMD into the bin directory of the MYSQ decompression directory, execute the following command: mysqld install
mysqltest--defaults-file= "E:\Develop\mysql-5.6.19-winx64\test.ini" "Note:
mysqltestFor the added service name "
If the following information appears, the service installation is successful:
Start the service through cmd Execution command: net start
mysqltestNote: The service name must be the same as before registration.
If you follow this tutorial, you will get an error with the following information:
Locate the error message by looking at the data directory, which is the log file ending with. Err in the E:\Develop\TestMysqlData directory, as follows:
2014-06-29 15:58:07 9116 [Note] Plugin ' federated ' is disabled. E:\develop\mysql-5.6.19-winx64\bin\mysqld:table ' mysql.plugin ' doesn ' t exist2014-06-29 15:58:07 9116 [ERROR] Can ' t Open the Mysql.plugin table. Please run Mysql_upgrade to create it.2014-06-29 15:58:07 9116 [Note] innodb:using Atomics to ref count buffer pool pages
Log prompt to solve the problem by executing Mysql_upgrade, continue to the MySQL directory in the bin directory to execute: Mysql_upgrade, the following exception message appears:
e:\develop\mysql-5.6.19-winx64\bin>mysql_upgradelooking for ' Mysql.exe ' as:e:\develop\mysql-5.6.19-winx64\bin\ mysql.exelooking for ' Mysqlcheck.exe ' as:e:\develop\mysql-5.6.19-winx64\bin\mysqlcheck.exefatal error:upgrade Failed
Start service via net start Mysqltest, still error.
At this point, copy all the files from the data directory in the MySQL directory to the E:\Develop\TestMysqlData directory and start the service successfully!
E:\develop\mysql-5.6.19-winx64\bin>net Start Mysqltestmysqltest Service is starting. The Mysqltest service has started successfully.
Connect the database through Workbench connection, open can see the local already started MySQL instance, double-click can directly open the connection.
Creating a database You can create a database with a default encoding of Utf-8 by performing the following steps in the SQL window of Workbench.
CREATE DATABASE test DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
At this time, the database test encoding Unified UTF8, the project code is set to UTF8, the basic will avoid the problem of data garbled.