为什么在重新安装安装文件时Mysql Server配置未配置服务器密码? [英] Why Mysql Server Configuration Not Configure Server Password when Reinstalling Setup file?

查看:118
本文介绍了为什么在重新安装安装文件时Mysql Server配置未配置服务器密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "NEW_MYSQL"
#define MyAppVersion "1.0"
#define MyAppPublisher "NEW_MYSQL"

#define MyAppExeName "NEW_MYSQL.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{36057E04-FDC0-4FE0-AB77-23F18955F60C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetProgramFiles}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName=NEW_MYSQL
LicenseFile=C:\Users\hyva\Desktop\NEW_MYSQL\NEW_MYSQL_license.txt
DisableProgramGroupPage=yes
OutputDir=C:\Users\hyva\Desktop\NEW_MYSQL\Setupfiles
OutputBaseFilename=setup_New_e

Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "C:\Users\hyva\Desktop\NEW_MYSQL\NEW_MYSQL\*"; DestDir: "{pf32}\NEW_MYSQL"; Flags: ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files


[Run]
Filename: {sys}\sc.exe; Parameters: "stop MySQL" ; Flags: runhidden
Filename: {pf32}\NEW_MYSQL\bin\MySQLInstanceConfig.exe; Parameters:"-i -q ""-l{pf32}\NEW_MYSQL\mysql_install_log.txt"" ""-nMySQL Server 5.5"" ""-p{pf32}\NEW_MYSQL\"" -v5.5.23 ""-t{pf32}\NEW_MYSQL\my-template.ini"" ""-c{pf32}\NEW_MYSQL\my.ini"" ServerType=SERVER DatabaseType=MIXED Port=3319 StrictMode=yes ConnectionCount=15 Charset=utf8 ServiceName=MySQL-HA AddBinToPath=yes RootPassword=myserver"; WorkingDir: {pf32}\NEW_MYSQL\bin\; StatusMsg: Configuring MySQL services; Description: Configuring MySQL Service; Flags: runhidden 
Filename: net.exe;Parameters: start MySQL;StatusMsg: Starting MySQL Server;Flags: runhidden

[UninstallRun]

Filename: {sys}\sc.exe; Parameters: "stop MySQL" ; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "delete MySQL" ; Flags: runhidden 

我在安装程序中附加了mysql二进制文件,它的工作正常,没有问题,但是当我去重新安装"myserver"时,Mysql Server密码应该不起作用

第二次安装服务器时配置空密码.我需要密码才能正常工作.

我该怎么办??

请帮助我...

感谢您的帮助

解决方案

我在安装程序中附加了mysql二进制文件,其工作正常 没问题,但是每当我去重新安装"myserver" Mysql Server时 密码不起作用

我想到的一种可能性

  • 使用设置"输入字段获取/设置旧/新密码
  • 以管理员身份登录到系统.

  • 创建一个文本文件,其中包含一行上的密码分配语句.
    将密码替换为您要使用的密码.

MySQL 5.7.5和更低版本:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

保存文件.此示例假定您将文件命名为C:\ mysql-init.txt.

使用特殊的--init-file选项启动MySQL服务器(注意,选项值中的反斜杠已加倍):

cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
mysqld --init-file=C:\\mysql-init.txt

服务器在启动时执行--init-file选项命名的文件的内容,更改'root'@'localhost'帐户密码.

要使服务器输出显示在控制台窗口中而不是日志文件中,请在mysqld命令中添加--console选项.

如果使用MySQL安装向导安装了MySQL,则可能需要指定--defaults-file选项.例如:

C:\> mysqld    
         --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 5.7\\my.ini"   
         --init-file=C:\\mysql-init.txt   

reset-permissions.html

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "NEW_MYSQL"
#define MyAppVersion "1.0"
#define MyAppPublisher "NEW_MYSQL"

#define MyAppExeName "NEW_MYSQL.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{36057E04-FDC0-4FE0-AB77-23F18955F60C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetProgramFiles}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName=NEW_MYSQL
LicenseFile=C:\Users\hyva\Desktop\NEW_MYSQL\NEW_MYSQL_license.txt
DisableProgramGroupPage=yes
OutputDir=C:\Users\hyva\Desktop\NEW_MYSQL\Setupfiles
OutputBaseFilename=setup_New_e

Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "C:\Users\hyva\Desktop\NEW_MYSQL\NEW_MYSQL\*"; DestDir: "{pf32}\NEW_MYSQL"; Flags: ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files


[Run]
Filename: {sys}\sc.exe; Parameters: "stop MySQL" ; Flags: runhidden
Filename: {pf32}\NEW_MYSQL\bin\MySQLInstanceConfig.exe; Parameters:"-i -q ""-l{pf32}\NEW_MYSQL\mysql_install_log.txt"" ""-nMySQL Server 5.5"" ""-p{pf32}\NEW_MYSQL\"" -v5.5.23 ""-t{pf32}\NEW_MYSQL\my-template.ini"" ""-c{pf32}\NEW_MYSQL\my.ini"" ServerType=SERVER DatabaseType=MIXED Port=3319 StrictMode=yes ConnectionCount=15 Charset=utf8 ServiceName=MySQL-HA AddBinToPath=yes RootPassword=myserver"; WorkingDir: {pf32}\NEW_MYSQL\bin\; StatusMsg: Configuring MySQL services; Description: Configuring MySQL Service; Flags: runhidden 
Filename: net.exe;Parameters: start MySQL;StatusMsg: Starting MySQL Server;Flags: runhidden

[UninstallRun]

Filename: {sys}\sc.exe; Parameters: "stop MySQL" ; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "delete MySQL" ; Flags: runhidden 

i have the attached mysql binary files in installer its working good no issue but when ever i went to Reinstalling "myserver" Mysql Server Password should be not working

at second time installation the server configuring Empty password. i need password for working Purpose.

what can i do????

Please help Me...

Thanks For Your Help

解决方案

I have the attached mysql binary files in installer its working good no issue but when ever i went to Reinstalling "myserver" Mysql Server Password should be not working

A possibility that comes to my mind

  • use a Setup input field to get/set the old/new password
  • Log on to your system as Administrator.

  • Create a text file containing the password-assignment statement on a single line.
    Replace the password with the password that you want to use.

MySQL 5.7.5 and earlier:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

Save the file. This example assumes that you name the file C:\mysql-init.txt.

Start the MySQL server with the special --init-file option (notice that the backslash in the option value is doubled):

cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
mysqld --init-file=C:\\mysql-init.txt

The server executes the contents of the file named by the --init-file option at startup, changing the 'root'@'localhost' account password.

To have server output to appear in the console window rather than in a log file, add the --console option to the mysqld command.

If you installed MySQL using the MySQL Installation Wizard, you may need to specify a --defaults-file option. For example:

C:\> mysqld    
         --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 5.7\\my.ini"   
         --init-file=C:\\mysql-init.txt   

resetting-permissions.html

这篇关于为什么在重新安装安装文件时Mysql Server配置未配置服务器密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆