0

我正在使用 inno setup 为我的 java 应用程序创建一个设置。该应用程序使用 mysql server 5.5。如何设置用户密码和主机?以及如何加载我的数据库?我找到了这段代码,但出了点问题。有人能帮我吗?

这个说法是对的,我用一个程序来检查mysql是否存在

Filename: "{reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysqld.exe"; Parameters: --install; WorkingDir: "{reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin"; StatusMsg: "Sto installando il Servizio MySQL"; Description: "Installing MySQL Service"; Flags: runhidden; Check: MySQL_Is

但这部分是错误的

Filename: net.exe; Parameters: start mysql; StatusMsg: Sto Avviando il Servizio MySQL; Description: Avvio Servizio MySQL; Flags: runhidden

Filename: {reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysql.exe; Parameters: "-e ""insert into mysql.user(host,user,password) values ('localhost','root', PASSWORD('emmaus'));"" -u root "; WorkingDir: {tmp}; StatusMsg: Configurazione del Server della Base di Dati; Flags: runhidden

Filename: {reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysql.exe; Parameters: "-u root -h localhost -e ""create database ata";

Filename: {reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysql.exe; Parameters: "-e ""grant all privileges on ata.* to ata;"" -u root"; WorkingDir: {tmp}; StatusMsg: Configurazione Server Base di Dati; Flags: runhidden

Filename: {reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysql.exe; Parameters: "-e ""flush privileges;"" -u root"; WorkingDir: {tmp}; StatusMsg: Configurazione Server Base di Dati; Flags: runhidden

Filename: {reg:HKLM\SOFTWARE\MySQL AB\MySQL Server 5.5,Location}\bin\mysql.exe; Parameters: "-u root -h localhost -e ""use ata; source ata.sql;"; WorkingDir: {tmp}; StatusMsg: Caricamento base di dati; Flags: runhidden  

Filename: netsh; Parameters: firewall add portopening TCP 3306 MySql; StatusMsg: Aplicando directivas de seguridad; MinVersion: 0,4.0; OnlyBelowVersion: 0,5.3; Description: Aplicando directivas de seguridad; Flags: runhidden

所有进程退出代码都是 = 1,除非我执行 net.exe,进程退出代码是 = 2

4

0 回答 0