Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Persisted MySQL data base files are not recognized #137

Open
sebastianfurth opened this issue Mar 8, 2018 · 1 comment
Open

Persisted MySQL data base files are not recognized #137

sebastianfurth opened this issue Mar 8, 2018 · 1 comment

Comments

@sebastianfurth
Copy link

sebastianfurth commented Mar 8, 2018

Hello,

we would like to use wix-embedded-mysql in the following scenario:

  • We have a data base schema "example" with persisted MySQL files (.FRM, .MYD, .MYI) available (provided externally)
  • We would like to start a wix-embedded-mysql instance that is aware of this schema

What we have tried so far is the following:

MysqldConfig config = aMysqldConfig(v5_6_23)
				.withCharset(UTF8)
				.withPort(2215)
				.withTimeout(2, TimeUnit.MINUTES)
				.withServerVariable("max_connect_errors", 666)
				.withTempDir(dataDirectory)
				.build();

EmbeddedMysql embeddedMySQL = anEmbeddedMysql(config).start();

// breaked here to copy manually the data base schema with the persisted files 
// to the "data" subdirectory of the downloaded MySQL distribution 
// (in a respective subdirectory called "example"). 
// (Will be automated when this trial is successful)

embeddedMySQL.addSchema(SchemaConfig.aSchemaConfig("example").build());

Although the schema is generally recognized the embedded MySQL instance un does not recognize any tables of the "injected" data base.

Would be great to get some hints to get this working.

Thank you in advance!

Best regards
Sebastian

@viliusl
Copy link
Collaborator

viliusl commented Apr 26, 2018

@sebastianfurth - this library was not build with support for such a scenario - I mean I would need to dig deeper and see how that would work regarding users/information_schema and connecting those with your database. I would agree with a PR for such a support, but I really don't have capacity to work on it currently:/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants