MySQL Server Install for Xojo

Hi everyone.

Today I’m working on the installer of my program. It uses mySQL 5.7 as Engine Database.

So, I need to do the installer on Windows, but I don’t want to install mySQL Community Server manually. I wanna do it unattended, silently.

So I googled, and I found a way to install on Command Lines “CMD”.

  1. Run CMD as Administrator
    msiexec /i “mysql-5.7.16-winx64.msi” /qn

So, It Installs MySQL Server 5.7 on C:/Program Files/MySQL Server 5.7

The next part that I have problem is to Set the Port, The name of the Service, and Root Password.
On mySQL’s webpage they call it “Instance Configuration”, and they do something like this:

MySQLInstanceConfig.exe -i -q "-lC:\\mysql_install_log.txt" » "-nMySQL Server 5.5" "-pC:\\Program Files\\MySQL\\MySQL Server 5.5" -v5.5.55 » "-tmy-template.ini" "-cC:\\mytest.ini" ServerType=DEVELOPMENT DatabaseType=MIXED » ConnectionUsage=DSS Port=3311 ServiceName=MySQL55 RootPassword=1234

The issue here is that I can’t find MySQLInstanceConfig.exe in any place, folder or directory.

Has anyone done this before?
Regards

It looks like MySQLInstanceConfig.exe has been deprecated. Have a look at https://dev.mysql.com/doc/refman/5.7/en/MySQLInstallerConsole.html

Yes, you have right.

I found a way to do it:

  1. Download mysql-installer-community-5.7.16.0.msi
  2. Run a Command Line “CMD” on same directory that you downloaded the installed previously
  3. msiexec /i mysql-installer-community-5.7.16.0.msi /quiet
  4. cd C:\Program Files (x86)\MySQL\MySQL Installer for Windows\
  5. MySQLInstallerConsole.exe install server;version=5.7.16.0;X64:*:port=3307;openfirewall=true;passwd=yourpassword -silent

This is the way to install with Console.
Apparently everything goes ok, except for this, It stops on this:

Unable to find any products that match server;version=5.7.16.0;X64

I put the version that the installer said, I can’t get whats wrong :frowning: :frowning:

[quote=301042:@Gerardo García]Yes, you have right.

I found a way to do it:

  1. Download mysql-installer-community-5.7.16.0.msi
  2. Run a Command Line “CMD” on same directory that you downloaded the installed previously
  3. msiexec /i mysql-installer-community-5.7.16.0.msi /quiet
  4. cd C:\Program Files (x86)\MySQL\MySQL Installer for Windows\
  5. MySQLInstallerConsole.exe install server;version=5.7.16.0;X64:*:port=3307;openfirewall=true;passwd=yourpassword -silent

This is the way to install with Console.
Apparently everything goes ok, except for this, It stops on this:

Unable to find any products that match server;version=5.7.16.0;X64

I put the version that the installer said, I can’t get whats wrong :frowning: :([/quote]
Finally I got it, I do this:

MySQLInstallerConsole.exe install server;5.6.21;x64:*:port=3306;passwd=mypassword; -silent

Obviously the next point would be Delete the Folder that contains the installer, and do all this stuff in Xojo using a “SH”.

By now, I’m good, Thanks so much

I change of opinion, I’m gonna test with Inno Setup, for make the Windows Installer :smiley:

Out of interest are you installing it on a desktop or a server and what happens if there is already an installation on the machine?

I’m installing on a Desktop(PC/MAC).

But now, I’m dealing to do the Windows Installer, once I finished I’ll continue with the Mac Installer.

About if is already an installation on the machine, at this point I have nothing.

But I facing with a curious thing, so I configured as I said lines before, but this time I can’t do it. Its says me that is a Comercial Version instead Community Version, and asks me for Oracle credentials (User/Password)

that’s the “benefit” of mysql : obscure licence scheme …
why don’t you use a postgres database ? these are completely and really free.

[quote=301109:@Jean-Yves Pochez]that’s the “benefit” of mysql : obscure licence scheme …
why don’t you use a postgres database ? these are completely and really free.[/quote]
ooooooo, So MySQL are not really free?. Wow, I imagined something like this.

So I solved the problem. Apparently when It installs, and uninstall, the uninstaller forgets to remove the MySQL folder located in ProgramData folder.

If I delete it correctly, Installation goes ok.

Meanwhile I’ll gonna study to migrate to Postrgre as you said. I don’t know if it would be very hard, all my project is Mysql based.
and I dunno if Postrgre is cross platform supported (Win, Mac,Linux)

Regards

postgres is multi platform.
you have to change the database instance from mysql to postgres,
then each database has some personnal sql requests you will find one after each other
but it should not be too complicated.
depends if you programmed it OOP, and with lots of common methods anywhere you can,
or linear “old” way with lots of duplicated with 2 changed lines inside between methods …

No MySQL is not free and I doubt that you are even entitled to ship it the way you are proposing to do. Check out MariaDB as an alternative, but again if you are shipping a commercial application I doubt you can do so.

Why do you need a server class database for a desktop application, is there something missing in SQLite that you need?

I did not notice that. but effectively if it is a local database, you dont need at all a server database !