This article mainly introduces the installation and configuration-free mysql5.6.19 process. Many mistakes have occurred throughout the process. After finishing the process, we will record a successful process for your reference.
Go to the mysq official website http://dev.mysql.com/downloads/mysql/to download the latest stable response. The mysql version used in this article is 5.6.19. To download the free installation version, select "Windows (x86, 64-bit), ZIP Archive" on the page: 217.2M]
Decompress the downloaded mysql.zip to E: \ Develop \ mysql-5.6.19-winx64
Create data Directory creation directory: E: \ Develop \ TestMysqlData, used to store mysql tables and data-related files.
Configure copy mysql extract directory my-default.ini as test. ini, configure basedir, datadir as front mysql directory and data directory. Add the encoding configuration: character_set_server = utf8, character_set_client = utf8. The file after the configuration is as follows:
basedir = E:/Develop/mysql-5.6.19-winx64datadir = E:/Develop/TestMysqlDatacharacter_set_server=utf8character_set_client=utf8
For more configurations, visit the configuration page on the mysql Official Website: Configure.
Run cmd to enter the bin directory of the mysq decompression directory. Run the following command: mysqld install
Mysqltest-- Defaults-file = "E: \ Develop \ mysql-5.6.19-winx64 \ test. ini" [Note:
MysqltestName of the added service]
If the following information is displayed, the service is successfully installed:
Run the following command to start the service: net start
Mysqltest[Note: The service name must be the same as that at the previous registration]
If you follow this tutorial, an error is reported. The information is as follows:
View the log file ending with. err in the data directory e: \ Develop \ TestMysqlData. The error message is 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
The log prompts you to solve the problem by executing mysql_upgrade. Continue to execute mysql_upgrade in the bin directory of the mysql decompression directory. The following exception occurs:
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
If you start the service through net start mysqltest, an error is still reported.
In this case, copy all the files in the data directory in the mysql extract directory to the E: \ Develop \ TestMysqlData directory, and then start the service!
E: \ Develop \ mysql-5.6.19-winx64 \ bin> net start mysqltestmysqltest service is starting. mysqltest service has started successfully.
Connect to the database through the workbench connection. After opening the connection, you can see the mysql instance that has been started locally. Double-click the instance to directly open the connection.
To create a database, follow the steps below in the SQL window of workbench to create a database with the default UTF-8 encoding.
CREATE DATABASE test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
At this time, the database test encoding is unified to utf8, and the engineering code is set to utf8, which will basically avoid data garbled.