標籤:ase rem tin into 伺服器 sql utf8 eating tar
MySQL Server 5.0–安裝及配置/MySQLInstanceConfig.exe用法詳解
http://blog.csdn.net/feihong247/article/details/7791105
配置MySQL步驟:
1. 運行MySQL Server安裝目錄下bin/MySQLInstanceConfig.exe。出現如下所示的嚮導介面
.
點擊“Next”進入下一步。
2. 如果MySQLInstanceConfig在MySQL Server的安裝目錄下找到my.ini檔案,就會詢問:是重新設定MySQL還是刪除MySQL service(同時刪除my.ini檔案)。
否則的話,出現下面的配置介面:
Detailed Configuration:自己配置大部分,更好地控制MySQL Server,讓它更好地發揮作用。
Standard Configuration:系統配置大部分,不希望關注很多的Server配置。
這裡選擇“Detailed Configuration”,下一步(Next)。
3. 出現選擇服務類型:
Developer Machine:主要為了個人使用,佔用系統最少的資源。
Server Machine:主要用於像FTP,email,web伺服器等等,耗用系統較多的資源。
Dedicated MySQL Server Machine:只用作MySQL伺服器,不運行其他程式。耗用系統所有可用的資源。
個人學習研究用,選“Developer Machine”,下一步(Next)。
4. 出現設定資料庫用法:
Multifunctional Database:使得InnoDB和MyISAM儲存引擎都可用,且資源平分。
Transactional Database Only:使得InnoDB和MyISAM儲存引擎都可用,但是InnoDB使用較多資源。
Non-Transactional Database Only:使InnoDB不可用,所有資源分派給MyISAM。
選擇“Multifunctional Database”,下一步(Next)。
5. 設定InnoDB datafile存放位置,預設即可,下一步(Next)。
6. 出現選擇並發串連設定對話方塊:
Decision Support(DSS)/OLAP:不需要大量的並發串連(20個左右)。預設值為100。
Online Transaction Processing(OLTP):需要大量的並發串連,預設值為500。
Manual Setting:個人設定了。
選擇“Manual Setting”,從下拉框中選擇10,下一步(Next).
7. 網路設定:
預設的連接埠號碼為3306,如果連接埠被佔用或不希望使用3306,可以更換。下一步(Next)。
8. 選擇預設的字元集:
Standard Character Set:Latin1為預設的字元集。主要用於西方歐洲國家的語言。
Best Support For Multilingualism:UTF8為預設的字元集。
Manual Selected Default Character Set / Collation:個人設定。(如果你希望資料庫支援漢字,請選擇gb2312)。
選擇預設的“Standard Character Set”,下一步(Next)。
9. 設定服務名稱,最好將“Include Bin Directory in Windows PATH”勾選:
10. 密碼的設定,其餘為預設:
11. 執行,使配置生效。
配置過程中出現的問題:
1. 在最後一個環節,執行到第四步,出現如下所示的錯誤。
此時,按Skip跳出,再重新執行MySQLInstanceConfig,重複上次的選項,執行就可以通過了。
這個主要出現在remove instance之後。
2. Client does not support authentication protocol.
工具串連資料庫時,若出現上述資訊,請到命令列方式下對密碼進行轉換:
mysql> SET PASSWORD FOR ‘root’@’localhost’ = OLD_PASSWORD(‘newpassword’);
4.1版本之後的密碼採用 password hashing algorithm,有些工具串連資料庫可能需要轉換。
3.
串連
MySQL
伺服器時,如果不是同一台
PC
機,出現串連不上。
在“設定
->
控制台
->Windows
防火牆”,點擊“例外”標籤,“添加連接埠”後,出現:
適當設定範圍。連接埠號碼為先前設定的連接埠號碼。
MySQLInstanceConfig的命令列參數:
To use the Instance Configuration Wizard from the command line the following parameters can be used. These parameters have to be 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 are.
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 not be 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 be applied to the database because the connection has 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–安裝及配置/MySQLInstanceConfig.exe用法詳解