Git Product home page Git Product logo

wix-embedded-mysql's Introduction

Wix Embedded MySql Build Status (Travis: Linux/OSX) Build Status (AppVeyor: Windows) Maven Central

[DEPRECATED] - mostly due to substantial changes in packaging between version changes and emergence of new and better ways to run embedded mysql. Please check-out Testcontainers as a better alternative.

Why?

  • Your tests can run on production-like environment: match version, encoding, timezone, database/schema/user settings;
  • Its easy, much easier than installing right version by hand;
  • You can use different versions/configuration per project without any local set-up;
  • Supports multiple platforms: Windows, Linux and OSX;
  • Provides constantly updated multiple versions of MySql - 5.5, 5.6, 5.7, 8.0;
  • Testing matrix for all supported OSes (x86/x64) and versions (5.5, 5.6, 5.7, 8.0).

Maven

Add dependency to your pom.xml:

    <dependency>
        <groupId>com.wix</groupId>
        <artifactId>wix-embedded-mysql</artifactId>
        <version>x.y.z</version>
        <scope>test</scope>
    </dependency>

Usage

Basic usage example

You can start an embedded mysql with defaults and a single schema:

import com.wix.mysql.EmbeddedMysql;

import static com.wix.mysql.EmbeddedMysql.anEmbeddedMysql;
import static com.wix.mysql.ScriptResolver.classPathScript;
import static com.wix.mysql.distribution.Version.v5_7_latest;

EmbeddedMysql mysqld = anEmbeddedMysql(v5_7_latest)
    .addSchema("aschema", classPathScript("db/001_init.sql"))
    .start();

//do work

mysqld.stop(); //optional, as there is a shutdown hook

Customizing mysqld settings

If you need more control in configuring embeded mysql instance, you can use MysqldConfig builder:

import com.wix.mysql.config.MysqldConfig;
import com.wix.mysql.EmbeddedMysql;
import static com.wix.mysql.ScriptResolver;

import java.util.concurrent.TimeUnit;

import static com.wix.mysql.config.MysqldConfig.aMysqldConfig;
import static com.wix.mysql.EmbeddedMysql.anEmbeddedMysql;
import static com.wix.mysql.distribution.Version.v5_6_23;
import static com.wix.mysql.config.Charset.UTF8;

MysqldConfig config = aMysqldConfig(v5_6_23)
    .withCharset(UTF8)
    .withPort(2215)
    .withUser("differentUser", "anotherPassword")
    .withTimeZone("Europe/Vilnius")
    .withTimeout(2, TimeUnit.MINUTES)
    .withServerVariable("max_connect_errors", 666)
    .build();

EmbeddedMysql mysqld = anEmbeddedMysql(config)
    .addSchema("aschema", ScriptResolver.classPathScript("db/001_init.sql"))
    .addSchema("aschema2", ScriptResolver.classPathScripts("db/*.sql"))
    .start();

//do work

mysqld.stop(); //optional, as there is a shutdown hook

Customizing download settings

In addition you can control additional settings of embedded mysql by providing configs that have base type of AdditionalConfig by providing those to anEmbeddedMysql builder:

import com.wix.mysql.EmbeddedMysql;

import static com.wix.mysql.EmbeddedMysql.anEmbeddedMysql;
import static com.wix.mysql.ScriptResolver.classPathScript;
import static com.wix.mysql.distribution.Version.v5_7_latest;
import static com.wix.mysql.config.DownloadConfig.aDownloadConfig;
import static com.wix.mysql.config.ProxyFactory.aHttpProxy;

DownloadConfig downloadConfig = aDownloadConfig()
    .withProxy(aHttpProxy("remote.host", 8080))
    .withCacheDir(System.getProperty("java.io.tmpdir"))
    .build();

EmbeddedMysql mysqld = anEmbeddedMysql(v5_7_latest, downloadConfig)
    .addSchema("aschema", classPathScript("db/001_init.sql"))
    .start();

//do work

mysqld.stop(); //optional, as there is a shutdown hook

Multiple schemas/databases

EmbeddedMysql supports multiple schemas and additional configuration options provided via SchemaConfig builder:

import com.wix.mysql.EmbeddedMysql;
import com.wix.mysql.config.SchemaConfig;

import static com.wix.mysql.EmbeddedMysql.anEmbeddedMysql;
import static com.wix.mysql.ScriptResolver.classPathScript;
import static com.wix.mysql.ScriptResolver.classPathScripts;
import static com.wix.mysql.config.SchemaConfig.aSchemaConfig;
import static com.wix.mysql.config.Charset.LATIN1;
import static com.wix.mysql.distribution.Version.v5_6_latest;

SchemaConfig schema = aSchemaConfig("aSchema")
    .withScripts(classPathScript("db/001_init.sql"))
    .withCharset(LATIN1)
    .build();

EmbeddedMysql mysqld = anEmbeddedMysql(v5_6_latest)
    .addSchema(schema)
    .addSchema("aschema2", classPathScripts("db/*.sql"))
    .start();

//do work

mysqld.stop(); //optional, as there is a shutdown hook

Resetting schemas between tests

It is intended to be started once per test-suite, but you can reset schema in between tests which recreates database and applies provided migrations:

import com.wix.mysql.EmbeddedMysql;

import static com.wix.mysql.EmbeddedMysql.anEmbeddedMysql;
import static com.wix.mysql.ScriptResolver.classPathScript;
import static com.wix.mysql.distribution.Version.v5_6_latest;

EmbeddedMysql mysqld = anEmbeddedMysql(v5_6_latest)
    .addSchema("aschema", classPathScript("db/001_init.sql"))
    .start();

//do work

mysqld.reloadSchema("aschema", classPathScript("db/001_init.sql"));

//continue on doing work

mysqld.stop(); //optional, as there is a shutdown hook

Source for examples can be found here

Using in a hermetic environment

Some build tools strongly encourages you to have tests which are isolated from the internet.
To support such a use-case you can use the wix-embedded-mysql-download-and-extract utility.
It produces a runnable jar (wix-embedded-mysql-download-and-extract-[[VERSION]]-jar-with-dependencies.jar) which you can call with java -jar wix-embedded-mysql-download-and-extract-[[VERSION]]-jar-with-dependencies.jar $downloadDir $majorVersion $minorVersion and it will download and extract the needed installer for you.
Additionally you should pass the download directory to your test so that it can configure your DownloadConfig#withCacheDir to use that directory instead of downloading it from the internet.

Dependencies

Build on top of de.flapdoodle.embed.process

How it works

  • After detecting current platform and requested version, Wix Embedded MySql will download the correct version from dev.mysql.com and extract needed files to local folder. Note that this is a one-time action, where subsequent invocations use pre-downloaded/pre-extracted cached package.
  • Upon execution needed files are being copied into target folder, database created, service started and post-configuration (user, schema, etc.) performed.
  • On jvm shutdown mysqld process is stopped and temporary files cleaned-up.

Tested on

  • latest OSX;
  • ubuntu precise 32/64;
  • windows 2012;

Known issues

  • starting version 5.7.18, Microsoft Visual C++ 2013 Redistributable Package needs to be pre-installed on windows.
  • starting version 5.5.10 libaio1.so needs to be pre-installed on linux, but that is not the case for some linux distributions. Proper error is emitted if it's missing and you have to install it manually (ex. ubuntu):
sudo apt-get install libaio1
  • if tests are failing with 'Broken pipe' or 'Stream closed' exceptions on linux, you might be missing libncurses5:
sudo apt-get install libncurses5
  • starting version 8.x.x more libraries from underlying os are required. Known list:
libnuma1 libssl1.0 libcrypto++6

License

Use of this source code is governed by a BSD License, which basically means you can use and modify it freely.

Similar project

MariaDB4j is an unrelated similar project.

wix-embedded-mysql's People

Contributors

aradchykov avatar arman1371 avatar barlevalon avatar dkarlinsky avatar dkomanov avatar dremeika avatar hmemcpy avatar ittaiz avatar jgerken avatar josephtaylor avatar kazuki43zoo avatar laurynaslubys avatar liucijus avatar maximn avatar michiakig avatar noam-almog avatar or-shachar avatar rafal-glowinski avatar sparhomenko avatar viliusl avatar vorburger avatar wix-andriusb avatar xenoamess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wix-embedded-mysql's Issues

Windows support is broken

java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[na:1.7.0_71]
at java.io.File.createNewFile(File.java:1006) ~[na:1.7.0_71]
at de.flapdoodle.embed.process.io.file.Files.createTempFile(Files.java:66) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.extract.FilesToExtract$Match.write(FilesToExtract.java:111) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.extract.AbstractExtractor.extract(AbstractExtractor.java:70) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.store.ArtifactStore.extractFileSet(ArtifactStore.java:73) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.use(CachingArtifactStore.java:131) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.store.CachingArtifactStore.extractFileSet(CachingArtifactStore.java:77) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at de.flapdoodle.embed.process.runtime.Starter.prepare(Starter.java:56) ~[de.flapdoodle.embed.process-1.40.1.jar:na]
at com.wix.mysql.EmbeddedMySqlTestSupport.givenMySqlWithConfig(EmbeddedMySqlTestSupport.java:20) [test-classes/:na]
at com.wix.mysql.EmbeddedMySqlTestSupport.startAndVerifyDatabase(EmbeddedMySqlTestSupport.java:24) [test-classes/:na]
at com.wix.mysql.SupportedVersionRunnerTest.runMySql_5_6_Defaults(SupportedVersionRunnerTest.java:27) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_71]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit-4.11.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit-4.11.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:na]
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) [junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) [junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) [junit-rt.jar:na]

de.flapdoodle.embed.process.exceptions.DistributionException: java.io.IOException: The system cannot find the path specified
at de.flapdoodle.embed.process.runtime.Starter.prepare(Starter.java:68)
at com.wix.mysql.EmbeddedMySqlTestSupport.givenMySqlWithConfig(EmbeddedMySqlTestSupport.java:20)
at com.wix.mysql.EmbeddedMySqlTestSupport.startAndVerifyDatabase(EmbeddedMySqlTestSupport.java:24)
at com.wix.mysql.SupportedVersionRunnerTest.runMySql_5_6_Defaults(SupportedVersionRunnerTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
Caused by: java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at de.flapdoodle.embed.process.io.file.Files.createTempFile(Files.java:66)
at de.flapdoodle.embed.process.extract.FilesToExtract$Match.write(FilesToExtract.java:111)
at de.flapdoodle.embed.process.extract.AbstractExtractor.extract(AbstractExtractor.java:70)
at de.flapdoodle.embed.process.store.ArtifactStore.extractFileSet(ArtifactStore.java:73)
at de.flapdoodle.embed.process.store.CachingArtifactStore$FilesWithCounter.use(CachingArtifactStore.java:131)
at de.flapdoodle.embed.process.store.CachingArtifactStore.extractFileSet(CachingArtifactStore.java:77)
at de.flapdoodle.embed.process.runtime.Starter.prepare(Starter.java:56)
... 24 more

server timezone should be UTC by default

In my project the database generates timestamps on update (as trigger)
The database should be configured to have default timezone UTC (or at least an option to change that)
This is what I am doing in the meantime:
val rootDs = PhotographyDbConfig(DefaultDBHost, DefaultPort, "root", "", PhotographyDbName).toRootDataSource
val db= new JdbcTemplate(rootDs)
println(s"Patch to fix timezone - start ${db.queryForMap("""SELECT @@session.time_zone;""").values.toString} ${db.queryForMap("""SELECT @@global.time_zone;""").values.toString}...")
println(s"Patch to fix timezone - execute ${db.execute("""SET @@session.time_zone = "+00:00";""")}")
println(s"Patch to fix timezone - execute ${db.execute("""SET @@global.time_zone = "+00:00";""")}")
println(s"Patch to fix timezone - end ${db.queryForMap("""SELECT @@session.time_zone;""").values.toString} ${db.queryForMap("""SELECT @@global.time_zone;""").values.toString}")

Failing to start process

I'm able to build and run locally, but when I try to build on a Jenkins server I get the following error:

17:16:49.088     2017-06-14 17:16:49,086 INFO  [Test worker] - Preparing EmbeddedMysql version 'Version 5.6.35'...
17:16:49.206     2017-06-14 17:16:49,204 INFO  [Test worker] - Preparing mysqld for startup
17:16:49.321     Master tearDown
17:16:49.348 Gradle Test Executor 1 finished executing tests.
17:16:49.351 
17:16:49.352 com.mypackage.CompleteTestSuite > classMethod FAILED
17:16:49.352     java.lang.RuntimeException: Command exited with error code: '1' and output: ''
17:16:49.352         at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:50)
17:16:49.352         at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:35)
17:16:49.352         at com.wix.mysql.distribution.setup.NixBefore57Initializer.apply(NixBefore57Initializer.java:33)
17:16:49.352         at com.wix.mysql.distribution.Setup.apply(Setup.java:26)
17:16:49.352         at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)
17:16:49.352         at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)
17:16:49.353         at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)
17:16:49.353         at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:47)
17:16:49.353         at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:155)

Has anyone ever seen this before, or can you recommend any way of trying to debug this?
Thanks!

Update: If I change the version of MySQL I want to run to 5.7, this error does not occur.

downloader starts multiple downloads for parallel test execution

Given tests run in parallel and required mysqld package is not yet cached, multiple downloads are started. This gives multiple issues:

  • suboptimal performance;
  • possible concurrency issues given files are downloaded at the same time.

I suppose it is possible to have some locking mechanism in a single-process set-up, but it needs to be investigated. Also this is issue of flapdoodle oss library, so supposedly fix should land there.

support more than one schema

the config object should hold "schemas" as a list of strings and not just a single schema.
in the editor, for example we use more than one database for our tests and we need that support.

db initialization does not have execution timeout

If for some reason it stalls, there is neither output nor jvm terminates - ever.

TBD:

  • add command output redirection to logger;
  • add timeout so that command terminates if it did not complete within x. time.

can't load .sql files from unexploded jars in classPathFiles

i'm using the embedded-mysql
there is a function
classPathFile
basically it does new File(resource.toURI)
this doesn't work for me when running maven, because everything is in a jar, so there is no file in the file that it can access
my jar depends on test-utils jar in test scope, and it has the mysql init code in main
this can be solved using java 8 filesystem

Set-up a multi-environment build

Now build for multiple environments (linux, osx, windows) is manual - it would be much better to do it in an automatic way - vagrant or smth like that.

Support HTTP redirects on first artifact download

Starting test for the first time.

Download Version 5.7.10:OS_X:B64 START
Download Version 5.7.10:OS_X:B64 DownloadSize: 288
Download Version 5.7.10:OS_X:B64 100% Download Version 5.7.10:OS_X:B64 downloaded with 0kb/s
Download Version 5.7.10:OS_X:B64 DONE
Extract /Users/user/.embedmysql/MySQL-5.7/mysql-5.7.10-osx10.9-x86_64.tar.gz START

/Users/user/.embedmysql/MySQL-5.7/mysql-5.7.10-osx10.9-x86_64.tar.gz contents:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.10-osx10.9-x86_64.tar.gz">here</a>.</p>
</body></html>

Error 206 (windows) when adding a big schema

The MysqlClient seems to just put the whole sql dump file into the commandline of the mysql client. On windows (maybe on linux, too) there is a limit on how long a commandline can be.

A better way should be to write the script content into stdin of the process.

Here's a little patch which should do that work:

MysqlClient-patch.txt

Note that this solution does not handle sql files which contain "SET NAMES ..." with any other charset than UTF-8 incorrectly.

MysqlClient fails to connect to embedded database when .my.cnf is present

When the user executing the embedded database has a .my.cnf in which she configured her default database connection, the MysqlClient will use the values for password and host from this file. If the configured database and the embedded database use the same port the MysqlClient will connect to the wrong database. Otherwise, it will fail to connect.

MysqlClient must explicitly use the following option --host=localhost --password=. I'll submit a pull request for that change.

charsets are being ignored

No matter what I use it's still UTF8 or something like that.
This is an urgent bug, we need to resolve it as fast as possible

CC: @tempit

Version 2.0.1 mysql_v_5_7 fails on Windows 7

With v_5_6_latest the integration Tests are running fine:

16:38:16.278 [DEBUG] [TestEventLogger]     2016-10-11 16:38:16.267  INFO 6236 --- [    Test worker] com.wix.mysql.EmbeddedMysql              : Preparing EmbeddedMysql version 'Version 5.6.24'...
16:38:22.619 [DEBUG] [TestEventLogger]     2016-10-11 16:38:22.616  INFO 6236 --- [    Test worker] com.wix.mysql.MysqldExecutable           : Preparing mysqld for startup
16:38:22.626 [DEBUG] [TestEventLogger]     2016-10-11 16:38:22.624  INFO 6236 --- [    Test worker] com.wix.mysql.MysqldExecutable           : Starting MysqldProcess
16:38:25.067 [DEBUG] [TestEventLogger]     2016-10-11 16:38:25.066  INFO 6236 --- [    Test worker] d.f.embed.process.runtime.Executable     : start com.wix.mysql.config.MysqldConfig@595b171e

while on v_5_7_latest it fails with this exception:
It fails to load the Application Context:

16:46:30.318 [DEBUG] [TestEventLogger]     2016-10-11 16:46:30.311  INFO 5812 --- [    Test worker] com.wix.mysql.EmbeddedMysql              : Preparing EmbeddedMysql version 'Version 5.7.10'...
16:46:30.671 [DEBUG] [TestEventLogger]     2016-10-11 16:46:30.667  INFO 5812 --- [    Test worker] com.wix.mysql.MysqldExecutable           : Preparing mysqld for startup
16:47:01.053 [DEBUG] [TestEventLogger]     2016-10-11 16:47:01.042 ERROR 5812 --- [    Test worker] o.s.boot.SpringApplication               : Application startup failed

16:47:01.054 [DEBUG] [TestEventLogger]     java.lang.RuntimeException: Command exited with error code: '-1' and output: ''
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:44) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:29) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.Mysql57Initializer.apply(Mysql57Initializer.java:32) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.Setup.apply(Setup.java:25) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.054 [DEBUG] [TestEventLogger]          at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.055 [DEBUG] [TestEventLogger]          at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101) ~[de.flapdoodle.embed.process-1.50.1.jar:na]
16:47:01.055 [DEBUG] [TestEventLogger]          at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:45) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.055 [DEBUG] [TestEventLogger]          at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.055 [DEBUG] [TestEventLogger]          at **myPackages**.BaseIT$EmbeddedMysqlInitializer.initialize(BaseIT.java:54) ~[integrationTest/:na]
16:47:01.055 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:634) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.055 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:342) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.055 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.055 [DEBUG] [TestEventLogger]          at org.springframework.boot.test.SpringApplicationContextLoader.loadContext(SpringApplicationContextLoader.java:98) [spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:230) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.056 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:249) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]
16:47:01.057 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.068 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) [gradle-testing-base-2.14.1.jar:2.14.1]
16:47:01.069 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
16:47:01.069 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
16:47:01.069 [DEBUG] [TestEventLogger]          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
16:47:01.069 [DEBUG] [TestEventLogger]          at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
16:47:01.069 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.069 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.076 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.076 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.076 [DEBUG] [TestEventLogger]          at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) [na:na]
16:47:01.076 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109) [gradle-testing-base-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
16:47:01.077 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
16:47:01.077 [DEBUG] [TestEventLogger]          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
16:47:01.077 [DEBUG] [TestEventLogger]          at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
16:47:01.077 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) [gradle-base-services-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) [gradle-base-services-2.14.1.jar:2.14.1]
16:47:01.077 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
16:47:01.077 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
16:47:01.078 [DEBUG] [TestEventLogger]          at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

16:47:01.080 [DEBUG] [TestEventLogger]     java.lang.IllegalStateException: Failed to load ApplicationContext
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:230) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.080 [DEBUG] [TestEventLogger]          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:249) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.081 [DEBUG] [TestEventLogger]          at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193) [spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66) [gradle-testing-jvm-2.14.1.jar:2.14.1]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) [gradle-testing-base-2.14.1.jar:2.14.1]
16:47:01.082 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
16:47:01.082 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
16:47:01.082 [DEBUG] [TestEventLogger]          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
16:47:01.082 [DEBUG] [TestEventLogger]          at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
16:47:01.082 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) [na:na]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109) [gradle-testing-base-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
16:47:01.083 [DEBUG] [TestEventLogger]          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
16:47:01.083 [DEBUG] [TestEventLogger]          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
16:47:01.083 [DEBUG] [TestEventLogger]          at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.083 [DEBUG] [TestEventLogger]          at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377) [gradle-messaging-2.14.1.jar:2.14.1]
16:47:01.084 [DEBUG] [TestEventLogger]          at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) [gradle-base-services-2.14.1.jar:2.14.1]
16:47:01.084 [DEBUG] [TestEventLogger]          at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) [gradle-base-services-2.14.1.jar:2.14.1]
16:47:01.084 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
16:47:01.084 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
16:47:01.084 [DEBUG] [TestEventLogger]          at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

16:47:01.084 [DEBUG] [TestEventLogger]     Caused by: java.lang.RuntimeException: Command exited with error code: '-1' and output: ''
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:44) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:29) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.setup.Mysql57Initializer.apply(Mysql57Initializer.java:32) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.distribution.Setup.apply(Setup.java:25) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101) ~[de.flapdoodle.embed.process-1.50.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:45) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131) ~[wix-embedded-mysql-2.0.1.jar:na]
16:47:01.084 [DEBUG] [TestEventLogger]          at **myPackages**.BaseIT$EmbeddedMysqlInitializer.initialize(BaseIT.java:54) ~[integrationTest/:na]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:634) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:342) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.boot.test.SpringApplicationContextLoader.loadContext(SpringApplicationContextLoader.java:98) ~[spring-boot-1.3.6.RELEASE.jar:1.3.6.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) ~[spring-test-4.2.7.RELEASE.jar:4.2.7.RELEASE]
16:47:01.085 [DEBUG] [TestEventLogger]          ... 45 common frames omitted

at myPackages initalize 54 it is the start() Method of _ anEmbeddedMysql_

                MysqldConfig config = aMysqldConfig(v5_7_latest)
                        .withPort(port)
                        .withUser("test", "123")
                        .build();

                anEmbeddedMysql(config).addSchema("schema").start();

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The first BankMapperTest success everytime, but the second PartnerMapperTest fail everytime, cause by MySql Communications link failure.

package com.xxx.test.common;

import com.wix.mysql.EmbeddedMysql;
import com.wix.mysql.config.MysqldConfig;
import org.junit.AfterClass;
import org.junit.BeforeClass;

import static com.wix.mysql.EmbeddedMysql.*;
import static com.wix.mysql.ScriptResolver.*;
import static com.wix.mysql.config.Charset.*;
import static com.wix.mysql.config.MysqldConfig.*;
import static com.wix.mysql.distribution.Version.*;

public abstract class EmbeddedMySqlTest extends AbstractTransactionalJUnit4SpringContextTests {

    private static EmbeddedMysql embeddedMysql;

    @BeforeClass
    public static void initMySql() {

        MysqldConfig config = aMysqldConfig(v5_6_24)
                .withCharset(UTF8)
                .withPort(3356)
                .withUser("root", "root")
                .withTimeZone("Asia/Shanghai")
                .build();

        embeddedMysql = anEmbeddedMysql(config)
                .addSchema("db_dev",
                           classPathFile("db/001_init_schema.sql"),
                           classPathFile("db/002_init_data.sql")
                )
                .start();
    }

    @AfterClass
    public static void stopMySql() {
        if (embeddedMysql != null) {
            embeddedMysql.stop();
        }
    }

}
@ContextConfiguration(locations = {
        "classpath:/spring/app-context.xml"})
public class BankMapperTest extends EmbeddedMySqlTest {

    @Autowired
    private BankMapper bankMapper;

    @Test
    public void test(){
        Bank bank = bankMapper.selectByPrimaryKey("100");
        assertThat(bank.getName()).isEqualTo("้‚ฎๅ‚จ้“ถ่กŒ");
    }
}
@ContextConfiguration(locations = {
        "classpath:/spring/app-context.xml"})
public class PartnerMapperTest extends EmbeddedMySqlTest {


    @Autowired
    private PartnerMapper partnerMapper;

    @Test
    public void getAllPartner() throws Exception {
        Pagination pagination = new Pagination(1,10);
        List<Partner> partners = partnerMapper.getAllPartner(0,"1",pagination);
        assertNotNull(partners);
    }


    @Test
    public void getDetail() throws Exception {
        List<Partner> partners = partnerMapper.getDetail("1");
        assertNotNull(partners);
    }

}
-------------------------------------------------------------------------------
Test set: com.xxx.mapper.BankMapperTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.44 sec
-------------------------------------------------------------------------------
Test set: com.xxx.mapper.partner.PartnerMapperTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.879 sec <<< FAILURE!
getAllPartner(com.xxx.mapper.partner.PartnerMapperTest)  Time elapsed: 0.073 sec  <<< ERROR!
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 10,320 milliseconds ago.  The last packet sent successfully to the server was 16 milliseconds ago.
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:241)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:372)
    at org.springframework.test.context.transaction.TransactionalTestExecutionListener$TransactionContext.startTransaction(TransactionalTestExecutionListener.java:583)
    at org.springframework.test.context.transaction.TransactionalTestExecutionListener.startNewTransaction(TransactionalTestExecutionListener.java:276)
    at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:171)
    at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:358)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 10,320 milliseconds ago.  The last packet sent successfully to the server was 16 milliseconds ago.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3604)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4155)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
    at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5357)
    at com.alibaba.druid.filter.FilterChainImpl.connection_setAutoCommit(FilterChainImpl.java:551)
    at com.alibaba.druid.filter.FilterAdapter.connection_setAutoCommit(FilterAdapter.java:984)
    at com.alibaba.druid.filter.FilterChainImpl.connection_setAutoCommit(FilterChainImpl.java:547)
    at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.setAutoCommit(ConnectionProxyImpl.java:430)
    at com.alibaba.druid.pool.DruidPooledConnection.setAutoCommit(DruidPooledConnection.java:674)
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:224)
    ... 33 more
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3161)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3615)
    ... 45 more


Fix custom configuration issues

Now when you are providing custom user/pass/schema it works only if you override all info. Need to do a proper rework on config/configbuilder.

Some issues:

  • cannot change pass on 'root';
  • cannot use system schema with different user;
  • etc.

cc @ittaiz

collision with embedded mongo

when using embedded mongo and embedded mysql on the same project, they both cannot live together because of the way we instrument things to artifact store builder.
this is a major issue that needs to be resolved before anything else.

Getting error code 141 when running on docker CentOS 7 image

Hi,

I got wix (using version 2.1.4) running correctly on my MacOS Sierra local machine, but our CI runs in a docker CentOS 7 container with Jenkins, and when running on Jenkins, I get this error when mysql is starting up:

20:06:07.708 [Test worker] INFO  com.wix.mysql.EmbeddedMysql - Preparing EmbeddedMysql version 'Version 5.6.35'...
    20:06:07.882 [Test worker] INFO  com.wix.mysql.MysqldExecutable - Preparing mysqld for startup
$EnhancerBySpringCGLIB$$29b53469]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySqlConfig': Invocation of init method failed; nested exception is java.lang.RuntimeException: Command exited with error code: '141' and output: ''

When googling, I found this #25 which seems to be how I'm running, Jenkins when running on Docker, it runs as root, and locally for test purposes, I ran the tests as root and got an error stating that the tests can't be run as root.
I see issue 25 was already fixed, is there something special I need to setup on my code so that it runs as root without issues?
This is my setup code:

MysqldConfig config = aMysqldConfig(v5_6_latest).withCharset(Charset.UTF8MB4)
                .withPort(port).withUser(username, password)
                .withTimeZone(TimeZone.getTimeZone("UTC")).withTimeout(600, TimeUnit.SECONDS).build();

        SchemaConfig schema = aSchemaConfig("my_dbschema").withCharset(Charset.UTF8MB4).build();
        mysqld = anEmbeddedMysql(config).addSchema(schema).start();

Where username and password are variables pulled from our configuration so the jdbc URL uses those as authentication for logging into embedded mysql.

Thanks!

Sometimes EmbeddedMySQL crashes

Today I was getting this error when running ITs:

screen shot 2016-06-03 at 11 29 58

When it happens, my ITs fail saying environment failed to initialize. Not sure which way causation goes because StackTrace indicates environment shutting down.

Vilius told me to comment out mysqld.stop() and it worked. However, now it works with mysqld.stop() as well.

Managed service used:

class MySqlManagedService(config: MysqldConfig, dbSchema: SchemaConfig) extends ManagedService {
  private var mysqld: EmbeddedMysql = _

  override def start(): Unit = mysqld = anEmbeddedMysql(config).addSchema(dbSchema).start()

  override def stop(): Unit = mysqld.stop()

  def reload(): Unit = mysqld.reloadSchema(dbSchema)
}

This seems like a race condition. It's up to you whether to investigate it or not. This might be too little information to go on.

If I manage to reproduce it, will post again.

Cannot run as root user with non blank password

I have noticed that it is not possible to connect to embedded MySQL using the username root and providing a non empty string password. It works fine if the password is empty string but if I use anything other value it fails to connect.

Is this because MySQL does not allow you to have a root user with a blank password? I suspect that it is, in which case feel free to close this issue but I just wanted to check whether it was something you knew about already?

I have created a repo here which demonstrates the issue, there are 4 tests, 3 work fine and 1 fails.

https://github.com/michaelruocco/embedded-mysql-password-issue

When the test fails it throws the following error when trying to connect to the embedded MySQL instance.

java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)
    at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
    at uk.co.tpplc.PasswordTest.testConnection(PasswordTest.java:60)
    at uk.co.tpplc.PasswordTest.shouldConnectWithRootUserAndPassword(PasswordTest.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:253)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:695)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1663)
    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:662)
    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)
    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:221)
    at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)
    at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
    ... 31 more

not safe to start multiple instances of embedded mysql for same major version

Now they share several resources:

  • temp fodler is fixed to ./target/mysql-5.x;
  • running multiple downloads in parralel is not safe.
  • might be some temp file issues (sock ir such).

Given you run multiple instances in parallel, it pretends to work (and starts), but it is in an inconsistent state as they potentially share database files and shutdown for only one instance will succeed.

Solution:

  • either think of a way to enable multiple parallel runs;
  • fail fast if another instance is being started in same process.

improve docs

Update readme.md to make examples clearer - now they look nice, but magic with static imports makes it hard to reproduce it in code - copy/paste.

result of builder does not conform to MangedService

Hey @viliusl,
while working with the Idans (@idankWix @idancohen11), we wanted to use the embedded mysql with the TestEnv support.
unfortunately, the builder has a start method, and the server has a stop method.
i think the builder should have a build that creates an object with start & stop and then it can be used directly as a MangedService with the implicits @hugebdu created.
https://github.com/wix-platform/wix-framework/blob/0f46e4ab99bdc485b10317f3a59387ae22599e81/hoopoe-common/hoopoe-it-test/src/main/scala/com/wixpress/framework/test/env/ManagedService.scala

WDYT?

Support proxy

Embedded Mongo supports proxy definition.
It would be nice to have the same feature for embedded-mysql.

embedded mySql does not run under root user

when running root user we will get an weird error.
we can either fix this by command line parameters --user ???
or by simple checking the running user and fail gracefully with a proper message (my preferred solution)
update docs to inform developers

CC: @orrsella

Download of MySQL Fails

I have had this issue raised against the gradle plugin project I have written that wraps this library: michaelruocco/embedded-mysql-plugin#2. The issue looks to be quite simple on the face of it, the download of MySQL is failing, and I think this is due to the download page on the MySQL website being moved from https://dev.mysql.com/get/Downloads/ to https://www.mysql.com/downloads/.

I can create a pull request to have a go at fixing this but I wanted to raise it first to get your view incase I am missing something or have not found the root cause of the issue.

All MySQL download URLs are failing

Hi,

When trying to set it up for the first time, I checked the downloaded gzip, changed the extension to HTML and it shows a Permanently Moved error with a link.

I think the download URLs need to be updated or else it will fail, or give instructions to manually setup if needed.

My machine is a MacOS Sierra, and selected both 5.6 and 5.7 for the test setup.

Thanks

Version 2.0.6 fails on windows

Version: 2.0.6
Windows 7 64bit;
Oracle JDK 8

1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% 99% 100% Download Version 5.6.33:Windows:B64 downloaded with 1926kb/s
Download Version 5.6.33:Windows:B64 DONE
Extract C:\Users\vytautasr\.embedmysql\MySQL-5.6\mysql-5.6.33-winx64.zip START
com.wixpress.framework.test.env.ITEnvManagedServiceException: Failed to start managed testing service [ITEmbeddedMysql]
    at com.wixpress.framework.test.env.InitGuardedManagedService$class.start(AbstractManagedService.scala:26)
    at com.wixpress.framework.test.env.AbstractManagedService.start(AbstractManagedService.scala:6)
    at com.wixpress.seomanager.core.embedded.MySqlServer.start(MySqlServer.scala:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.wixpress.framework.test.env.ManagedService$$anon$4.start(ManagedService.scala:24)
    at com.wixpress.framework.test.env.AsyncCompositeManagedService$$anonfun$start$1.apply(CompositeManagedService.scala:16)
    at com.wixpress.framework.test.env.AsyncCompositeManagedService$$anonfun$start$1.apply(CompositeManagedService.scala:16)
    at com.wixpress.framework.test.env.AsyncCompositeManagedService$$anonfun$fanout$1$$anonfun$apply$1.apply$mcV$sp(CompositeManagedService.scala:24)
    at com.wixpress.framework.test.env.AsyncCompositeManagedService$$anonfun$fanout$1$$anonfun$apply$1.apply(CompositeManagedService.scala:24)
    at com.wixpress.framework.test.env.AsyncCompositeManagedService$$anonfun$fanout$1$$anonfun$apply$1.apply(CompositeManagedService.scala:24)
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
    at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 13
    at org.apache.commons.compress.archivers.zip.X7875_NewUnix.parseFromLocalFileData(X7875_NewUnix.java:199)
    at org.apache.commons.compress.archivers.zip.X7875_NewUnix.parseFromCentralDirectoryData(X7875_NewUnix.java:220)
    at org.apache.commons.compress.archivers.zip.ExtraFieldUtils.parse(ExtraFieldUtils.java:174)
    at org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setCentralDirectoryExtra(ZipArchiveEntry.java:561)
    at org.apache.commons.compress.archivers.zip.ZipFile.readCentralDirectoryEntry(ZipFile.java:616)
    at org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:533)
    at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:216)
    at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:192)
    at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:153)
    at de.flapdoodle.embed.process.extract.ZipExtractor.archiveStream(ZipExtractor.java:42)
    at de.flapdoodle.embed.process.extract.AbstractExtractor.archiveStreamWithExceptionHint(AbstractExtractor.java:47)
    at de.flapdoodle.embed.process.extract.AbstractExtractor.extract(AbstractExtractor.java:66)
    at de.flapdoodle.embed.process.store.ArtifactStore.extractFileSet(ArtifactStore.java:79)
    at de.flapdoodle.embed.process.store.ExtractedArtifactStore.extractFileSet(ExtractedArtifactStore.java:103)
    at com.wix.mysql.store.SafeExtractedArtifactStore.extractFileSet(SafeExtractedArtifactStore.java:30)
    at de.flapdoodle.embed.process.runtime.Starter.prepare(Starter.java:56)
    at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:39)
    at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131)
    at com.wixpress.mysql.ITEmbeddedMysql.doStart(ITEmbeddedMysql.scala:34)
    at com.wixpress.framework.test.env.InitGuardedManagedService$class.start(AbstractManagedService.scala:28)
    ... 19 more

Mysql server configuration

Hey hello,
I have an issue with Case Sensitivity in table names.
I have upper case table names in my database and lower case table names in my code. I have to make it case insensitive. I see 2 ways to setup it:

  1. Customize my.cnf file to change default settings.
  2. update information_schema with SQL request.

I don't know if it's possible to change my.cnf in your library and the idea with update script doesn't work too:
EmbeddedMysql mysqld = anEmbeddedMysql(config) .addSchema("my_schema", Sources.fromFile(new File("database/mysql/initial.sql")), Sources.fromString("update information_schema.GLOBAL_VARIABLES set VARIABLE_VALUE=2 where VARIABLE_NAME='LOWER_CASE_TABLE_NAMES';") ) .start();

I get an error:

com.wix.mysql.exceptions.CommandFailedException: Command 'update information_schema.GLOBAL_VARIABLES set VARIABLE_VALUE=2 where VARIABLE_NAME='LOWER_CASE_TABLE_NAMES';' on schema 'my_schema' failed with errCode '1' and output 'ERROR 1044 (42000) at line 1: Access denied for user 'root'@'127.0.0.1' to database 'information_schema'

Maybe you can help me with it or you have some thoughts how to do it?
Anyway, at least, it would be nice to have an ability to setup my.cnf in your library.

artifactory support

Allow caching data into artifactory instead of the current file system solution.

Proposal: change versioning scheme

Maybe we should move to a different versioning scheme. Mainly due to testing/test-runtime.

I would propose to move to meta-versions like:

v5_5_latest("5.5", "40"),
v5_6_latest("5.6", "23"),
@Deprecated("use at your own risk, can be removed at every point without a notice.")
v5_7_rc("5.6", "23"),

Then for each major version we will have only one minor. What do you think?

Ability To Customize Download Path

We want to use this on a project but currently struggling because of proxy issues. Would it be possible to add the ability to customize the download path?

We could then just let our artifactory download the archive and we could get it from there.

Flaky Behavior - does not always start correctly

We're running embedded mysql on Jenkins (various same config CentOS AWS instance slaves), for some jobs it works fine, and then the next fails on starting MySql
All I can see is some warnings, but seems to be a timeout issue, even though doesn't say it anywhere

This is the class we use to create the DB instance (mostly copy paste from readme), locally this works every time.

public class StaticMySQLTestDB {

    private final static int mySqlPort = findFreePort();

    public static int getMySqlPort() {
        return mySqlPort;
    }

    private final static MysqldConfig config = aMysqldConfig(v5_5_40)
            .withCharset(UTF8)
            .withPort(mySqlPort)
            .withUser("sa", "")
            .withTimeZone("Europe/Vilnius")
            .build();

    private final static SchemaConfig schemaConfig = aSchemaConfig("cm").build();

    static {
        anEmbeddedMysql(config).addSchema(schemaConfig).start();
        runMigration();

    }

    private static int findFreePort(){
        try (ServerSocket socket = new ServerSocket(0)) {
            return socket.getLocalPort();
        } catch (IOException e) {
            System.err.println("Couldn't find a free port");
            throw new RuntimeException(e);
        }
    }

    private static void runMigration() {
        try (Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:" + mySqlPort + "/cm", "sa", "")) {
            final Liquibase migrator = new Liquibase("migrations.xml", new ClassLoaderResourceAccessor(), new JdbcConnection(connection));
            migrator.update("");
        } catch (Exception e) {
            throw new RuntimeException("Liquibase migration failed", e);
        }
    }

}

And this is the output we get

Caused by: java.lang.RuntimeException: Command exited with error code: '-1' and output: 'OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqladmin -u root password 'new-password'
  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqladmin -u root -h ip-10-121-50-12 password 'new-password'

Alternatively you can run:

  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd . ; /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

'
    at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:44)
    at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:29)
    at com.wix.mysql.distribution.setup.NixBefore57Initializer.apply(NixBefore57Initializer.java:31)
    at com.wix.mysql.distribution.Setup.apply(Setup.java:25)
    at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)
    at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)
    at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)
    at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:45)
    at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131)
    at com.....cm.testutils.StaticMySQLTestDB.<clinit>(StaticMySQLTestDB.java:43)
    ... 39 more
Standard Output

07:33:07.389 [Test worker] INFO com.wix.mysql.EmbeddedMysql - Preparing EmbeddedMysql version 'Version 5.6.24'...
Download Version 5.6.24:Linux:B64 START
Download Version 5.6.24:Linux:B64 DownloadSize: 312043744
Download Version 5.6.24:Linux:B64 0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% 99% 100% Download Version 5.6.24:Linux:B64 downloaded with 2795kb/s
Download Version 5.6.24:Linux:B64 DONE
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz START
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/bin/my_print_defaults
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/bin/mysqladmin
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/bin/mysql
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/bin/resolveip
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/bin/mysqld
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/share/mysql_security_commands.sql
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/share/english/errmsg.sys
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/share/mysql_system_tables.sql
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/share/fill_help_tables.sql
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/share/mysql_system_tables_data.sql
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/support-files/my-default.cnf
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz extract mysql-5.6.24-linux-glibc2.5-x86_64/scripts/mysql_install_db
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz noting left
Extract /home/centos/.embedmysql/MySQL-5.6/mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz DONE
07:35:04.166 [Test worker] INFO com.wix.mysql.MysqldExecutable - Preparing mysqld for startup
07:35:24.327 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - Installing MySQL system tables...2016-09-21 07:35:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
07:35:24.327 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 0 [Note] /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqld (mysqld 5.6.24) starting as process 15469 ...
07:35:24.328 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Warning] Buffered warning: Changed limits: max_open_files: 4096 (requested 5000)
07:35:24.328 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 
07:35:24.328 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Warning] Buffered warning: Changed limits: table_open_cache: 1967 (requested 2000)
07:35:24.328 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Using atomics to ref count buffer pool pages
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: The InnoDB memory heap is disabled
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Memory barrier is not used
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Compressed tables use zlib 1.2.3
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Using Linux native AIO
07:35:24.330 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Using CPU crc32 instructions
07:35:24.331 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Initializing buffer pool, size = 128.0M
07:35:24.338 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Completed initialization of buffer pool
07:35:24.342 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
07:35:24.342 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
07:35:24.342 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:24 15469 [Note] InnoDB: Database physically writes the file full: wait...
07:35:36.030 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:35:36 15469 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
07:36:16.225 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:16 15469 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
07:36:27.035 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
07:36:27.035 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Warning] InnoDB: New log files created, LSN=45781
07:36:27.036 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Doublewrite buffer not found: creating new
07:36:27.068 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Doublewrite buffer created
07:36:27.073 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: 128 rollback segment(s) are active.
07:36:27.074 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Warning] InnoDB: Creating foreign key constraint system tables.
07:36:27.084 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Foreign key constraint system tables created
07:36:27.084 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Creating tablespace and datafile system tables.
07:36:27.255 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Tablespace and datafile system tables created.
07:36:27.256 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: Waiting for purge to start
07:36:27.306 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:27 15469 [Note] InnoDB: 5.6.24 started; log sequence number 0
07:36:28.889 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:28 15469 [Note] Binlog end
07:36:28.889 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:28 15469 [Note] InnoDB: FTS optimize thread exiting.
07:36:28.889 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:28 15469 [Note] InnoDB: Starting shutdown...
07:36:30.100 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15469 [Note] InnoDB: Shutdown completed; log sequence number 1625977
07:36:30.102 [Thread-6] DEBUG com.wix.mysql.MysqldProcess - OK
07:36:30.102 [Thread-6] DEBUG com.wix.mysql.MysqldProcess - 
07:36:30.107 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - Filling help tables...2016-09-21 07:36:30 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
07:36:30.107 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 0 [Note] /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqld (mysqld 5.6.24) starting as process 15518 ...
07:36:30.141 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Warning] Buffered warning: Changed limits: max_open_files: 4096 (requested 5000)
07:36:30.141 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 
07:36:30.141 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Warning] Buffered warning: Changed limits: table_open_cache: 1967 (requested 2000)
07:36:30.141 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Using atomics to ref count buffer pool pages
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: The InnoDB memory heap is disabled
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Memory barrier is not used
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Compressed tables use zlib 1.2.3
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Using Linux native AIO
07:36:30.143 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Using CPU crc32 instructions
07:36:30.144 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Initializing buffer pool, size = 128.0M
07:36:30.151 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Completed initialization of buffer pool
07:36:30.156 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Highest supported file format is Barracuda.
07:36:30.167 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: 128 rollback segment(s) are active.
07:36:30.168 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Waiting for purge to start
07:36:30.218 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: 5.6.24 started; log sequence number 1625977
07:36:30.277 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] Binlog end
07:36:30.277 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: FTS optimize thread exiting.
07:36:30.278 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:30 15518 [Note] InnoDB: Starting shutdown...
07:36:31.990 [Thread-7] DEBUG com.wix.mysql.MysqldProcess - 2016-09-21 07:36:31 15518 [Note] InnoDB: Shutdown completed; log sequence number 1625987
Standard Error

Embedded MySQL failed to start
java.lang.RuntimeException: Command exited with error code: '-1' and output: 'OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqladmin -u root password 'new-password'
  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqladmin -u root -h ip-10-121-50-12 password 'new-password'

Alternatively you can run:

  /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd . ; /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /home/centos/workspace/jab-cms-pull-request-from-dsl/cm-client/target/mysql-5.6-6d9fe79d-bc0a-4e8b-a60d-477990ad9ef9/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

'
    at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:44)
    at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:29)
    at com.wix.mysql.distribution.setup.NixBefore57Initializer.apply(NixBefore57Initializer.java:31)
    at com.wix.mysql.distribution.Setup.apply(Setup.java:25)
    at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)
    at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)
    at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)
    at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:45)
    at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:131)
    at com.....cm.testutils.StaticMySQLTestDB.<clinit>(StaticMySQLTestDB.java:43)
    at com.....cm.client.GenericClientIntegrationTest.<clinit>(GenericClientIntegrationTest.java:43)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
    at java.lang.reflect.Field.get(Field.java:393)
    at org.junit.runners.model.FrameworkField.get(FrameworkField.java:73)
    at org.junit.runners.model.TestClass.getAnnotatedFieldValues(TestClass.java:230)
    at org.junit.runners.ParentRunner.classRules(ParentRunner.java:255)
    at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:244)
    at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

make it work in windows

Flapdoodle process library has been patched. Have to make it work on windows - run, fix, verify.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.