MySQLInstanceConfig 命令详解

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值