The previous talk about the optimization of MySQL, mainly to build a table for a large number of tables to add indexing mechanism, improve query efficiency, and some simple optimization of SQL statements, after all, I am not a professional database administrator, Daniel do not spray.
Write two chapters today on the Javaweb project, the main purpose of the database optimization is to reduce the database access pressure and read and write pressure.
Because the usual work is developed on Windows, so explain under Windows installation mysql5.6
1.
Download
Http://dev.mysql.com/downloads/windows/installer/5.6.html
2.
installation
We use the installation mode custom custom : Select either a level or A
By default, you can:
description , If you do not have the page in the previous step , Select the Advanced option :
Installation Complete
start configuring MySQL
Configuration:
3.
MySQL multi-instance installation
Multiple instances cannot be installed using the installer and can only be installed manually.
1 Copy the installed 3380 folder to 3381
2 Go to 3381\logs directory to delete all files
3 Go to 3381\data directory and delete all log files (note Not all Files )
4 Open my.ini file, replace all 3380 with 3381 I personally like to use notepad++ to modify text by a friend's shadow Rang
5 Modify ServerID to 81 that is 3381 port 81 above 3380 Server-id is 80
6
Open cmd, enter the C:\mysql-5.6\3381\bin directory, execute the following command:
. \mysqld.exe install MySQL-3381--defaults-file= "C:\mysql-5.6\3381\data\my.ini" note change to your own configuration file path
. \mysqld.exe install MySQL-3380--defaults-file= "E:\0315\mysql\3380\data\my.ini"
7 Enter system service view
8 Modify the startup mode to Manual, install complete.
To remove a service, perform the following name:. \mysqld.exe Remove MySQL-3381
the Server-id in the configuration file is not the same when you install a service again
. \mysqld.exe install MySQL-3381--defaults-file= "E:\0315\mysql\3381\data\my.ini"
This is the case, the example is relatively simple
Use Spring+mysql for read-write separation (i) about Windows installation mysql5.6