MySQL Server 5.0– Installation and configuration/mysqlinstanceconfig.exe usage
http://blog.csdn.net/feihong247/article/details/7791105
To configure MySQL steps:
1. Run the MySQL server installation directory under Bin/mysqlinstanceconfig.exe. The wizard interface appears as shown below
.
Click "Next" to proceed to the next step.
2. If Mysqlinstanceconfig finds the My.ini file in the installation directory of MySQL server, it asks whether to reconfigure MySQL or delete the MySQL service (and delete the My.ini file).
Otherwise, the following configuration interface appears:
Detailed configuration: Configure most of your own, better control MySQL Server, let it play a better role.
Standard configuration: Most system configurations do not want to focus on many server configurations.
Choose "Detailed Configuration" here, next.
3. The Select service type appears:
Developer machine: Mainly for personal use, occupy the minimum system resources.
Server machine: Mainly used for the resources like Ftp,email,web server and so on, consuming system more.
Dedicated MySQL server machine: Serves only as a MySQL servers and does not run other programs. Consumes all available resources of the system.
For individual study, select "Developer Machine" and next.
4. Settings database usage appears:
Multifunctional Database: Makes both the InnoDB and MyISAM storage engines available and the resources split equally.
Transactional Database only: makes both the InnoDB and MyISAM storage engines available, but InnoDB uses more resources.
Non-transactional Database only: Make InnoDB unavailable, all resources assigned to MyISAM.
Select "Multifunctional Database" and the next step (next).
5. Set InnoDB datafile storage location, default, Next (next).
6. The Select Concurrent Connection Settings dialog box appears:
Decision Support (DSS)/olap: Does not require a large number of concurrent connections (20 or so). The default value is 100.
Online Transaction Processing (OLTP): Requires a large number of concurrent connections, with a default value of 500.
Manual Setting: Personal set up.
Select "Manual Setting", select 10 from the drop-down box and next (next).
7. Network settings:
The default port number is 3306, which can be replaced if the port is occupied or you do not want to use 3306. Next (Next).
8. Select the default character set:
Standard Character set:latin1 is the default character set. Mainly used in the languages of western European countries.
Best support for Multilingualism:utf8 is the default character set.
Manual Selected Default Character set/collation: Personal settings. (If you want the database to support kanji, select gb2312).
Select the default "Standard Character Set", next.
9. To set the service name, it is a good idea to check "Include Bin Directory in Windows PATH":
10. Password settings, the rest is the default:
11. Execute to make the configuration effective.
Issues that occur during configuration:
1. In the last link, proceed to step fourth and the error shown below appears.
At this point, press skip to jump out, and then re-execute Mysqlinstanceconfig, repeat the last option, execution can be passed.
This appears mainly after the remove instance.
2. Client does not support authentication protocol.
When the tool connects to the database, if the above message appears, go to the command line to convert the password:
mysql> SET PASSWORD FOR ‘root’ @ ’localhost’ = OLD_PASSWORD (‘newpassword’);
the password after the 4.1 version is password hashing algorithm, and some tools that connect to the database may need to be converted.
3. When connecting to the MySQL server, if it is not the same PC, there will be no connection.
In "Settings-> Control Panel-> Windows Firewall", click the "Exceptions" tab, after "Add Port", it appears:
Set the scope appropriately. The port number is the previously set port number.
Mysqlinstanceconfig command-line arguments:
The Instance Configuration Wizard from the command line, the following parameters can be used. These parameters has to is set to run from the command line
-n<product name>
-p<path of Installation> (No/bin)
-v<version>
Actions to perform
-I (Install instance)
-R (remove instance)
-S (stop instance)
-Q (Be quiet)
-lfilename (write log file)
When launched manually, these can also be submitted
-T<.CNF Template filename>
-C<.CNF filename>
Use the following option to define the parameters for the config file generation.
servicename=$
Addbintopath={yes | no}
servertype={development | SERVER | Dedicated}
databasetype={mixed | INNODB | MYISAM}
Connectionusage={dss | OLTP}
connectioncount=#
Skipnetworking={yes | no}
port=#
Strictmode={yes | no}
charset=$
rootpassword=$
rootcurrentpassword=$
The return codes of the Wizard in case of an error is.
2 ... Configuration template file cannot be found.
3 ... The Windows service entry cannot be created.
4 ... Could not connect to the Service Control Manager.
5 ... The MySQL service cannot be started.
6 ... The MySQL service cannot be stopped.
7 ... The security settings cannot be applied.
8 ... The configuration file cannot be written.
9 ... The Windows service entry cannot be removed.
Examples:
The following command installs a MySQL Server 5.0 instance from the directory
C:/programme/mysql/mysql Server 5.0 using the service name mysqlcust and settingthe root password to 1234.
Mysqlinstanceconfig.exe-i-Q "-lc:/mysql_install_log.txt" "-nmysql Server 5.0"
"-pc:/programme/mysql/mysql Server 5.0"-v5.0.13 "-T. /.. /res/my-template.ini ""-cc:/mytest.ini "
Servertype=development databasetype=mixed Connectionusage=dss port=3311
Servicename=mysqlcust rootpassword=1234
If The server can isn't started, the exit code is 2.
The following command removes the server instance with the name Mysqlcust.
Mysqlinstanceconfig.exe-r-Q "-lc:/mysql_install_log.txt" "-nmysql Server 5.0"
"-pc:/programme/mysql/mysql Server 5.0"-v5.0.13 "-cc:/mytest.ini" Servicename=mysqlcust
Output into the log file:
----------------------------------------
Welcome to the MySQL Server Instance Configuration Wizard 1.0.6
Date:2005-10-19 21:53:16
Installing service ...
Product Name:mysql Server 5.0
version:5.0.13
Installation Path:c:/programme/mysql/mysql Server 5.0/
Creating configuration file C:/mytest.ini using template: /.. /res/my-template.ini.
Options:
Development
MIXED
Dss
Strictmode
Variables:
port:3311
Default-character-set:latin1
Basedir: "C:/programme/mysql/mysql Server 5.0/"
DataDir: "C:/programme/mysql/mysql Server 5.0/data/"
Creating Windows Service entry.
Service Name: "Mysqlcust"
Parameters: "C:/programme/mysql/mysql Server 5.0/bin/mysqld-nt"--defaults-file= "C:/mytest.ini" mysqlcust.
Windows service Mysqlcust installed.
Service started successfully.
The security settings could not being applied to the database because the connection have failed with the following error.
Error Nr. 1045
Access denied for user ' root ' @ ' localhost ' (using Password:no)
----------------------------------------
Welcome to the MySQL Server Instance Configuration Wizard 1.0.6
Date:2005-10-19 21:53:46
Removing Service ...
Instance stopped.
Windows Service removed.
Service Name:mysqlcust
Configuration file removed.
Filename:c:/mytest.ini
MySQL Server 5.0– Installation and configuration/mysqlinstanceconfig.exe usage