Why Mysql Server Configuration Not Configure Serve

2019-08-27 05:20发布

问题:

; 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

回答1:

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