powershell写mysql_powershell脚本一键安装MySQL

本文介绍了如何利用PowerShell编写脚本来实现MySQL的自动化安装。通过调用msiexec命令行工具,配合不同参数,可以实现静默安装、无人值守安装或者自定义用户交互级别的安装。同时,内容涵盖了安装选项、显示选项、重启选项、日志记录选项以及更新和修复选项,为高效部署MySQL提供便利。
摘要由CSDN通过智能技术生成

mysql-installer-community-5.7.21.0.msi /?

Windows ® Installer. V 5.0.16299.15

msiexec /Option [Optional Parameter]

Install Options

Installs or configures a product

/a

Administrative install - Installs a product on the network

/j [/t ] [/g ]

Advertises a product - m to all users, u to current user

Uninstalls the product

Display Options

/quiet

Quiet mode, no user interaction

/passive

Unattended mode - progress bar only

/q[n|b|r|f]

Sets user interface level

n - No UI

b - Basic UI

r - Reduced UI

f - Full UI (default)

/help

Help information

Restart Options

/norestart

Do not restart after the installation is complete

/promptrestart

Prompts the user for restart if necessary

/forcerestart

Always restart the computer after installation

Logging Options

/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*]

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Start up of actions

r - Action-specific records

u - User requests

c - Initial UI parameters

m - Out-of-memory or fatal exit information

o - Out-of-disk-space messages

p - Terminal properties

v - Verbose output

x - Extra debugging information

+ - Append to existing log file

! - Flush each line to the log

* - Log all information, except for v and x options

/log

Equivalent of /l*

Update Options

/update [;Update2.msp]

Applies update(s)

/uninstall [;Update2.msp] /package

Remove update(s) for a product

Repair Options

/f[p|e|c|m|s|o|d|a|u|v]

Repairs a product

p - only if file is missing

o - if file is missing or an older version is installed (default)

e - if file is missing or an equal or older version is installed

d - if file is missing or a different version is installed

c - if file is missing or checksum does not match the calculated value

a - forces all files to be reinstalled

u - all required user-specific registry entries (default)

m - all required computer-specific registry entries (default)

s - all existing shortcuts (default)

v - runs from source and recaches local package

Setting Public Properties

[PROPERTY=PropertyValue]

Consult the Windows ® Installer SDK for additional documentation on the

command line syntax.

Copyright © Microsoft Corporation. All rights reserved.

Portions of this software are based in part on the work of the Indepen

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值