Does anyone know how to distribute the application and mysql database together?
I'm using Innosetup, until I can install mysql, start the service but when I connect it gives error saying that I can not connect. See the inno code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "ServerSisEscola"
#define MyAppVersion "1.0"
#define MyAppPublisher "ServerSisEscola"
#define MyAppURL "http://"
#define MyAppExeName "MyProg.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={{6AF944A0-16EF-4099-8AA7-6FC0F023D9E5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
[Files]
Source: D:\tcc Sis_escola\Sistema_Escola\Sistema_Escola\bin\Debug\Banco\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Source: D:\tcc Sis_escola\Sistema_Escola\Sistema_Escola\bin\Debug\Banco\IniciarServico.bat; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
[Tasks]
Name: ServidorSisEscola; Description: Servidor Sistema Escola; Flags: exclusive
[Run]
Filename: {app}\IniciarServico.bat; Flags: waituntilidle
After that it opens a .bat to configure:
cd bin
mysqld --install Mysql_SistemaEscola --defaults-file="C:\ServerSisEscola\my.ini")
net start Mysql_SistemaEscola
cd bin
mysql -u root -p 3308 -h localhost SistemaEscola.sql <SistemaEscola.sql
I've copied the entire mysql folder to the directory of my application according to this tutorial but it did not work, I can not connect.