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

User created dont have grant privilege #131

Open
josepharuja opened this issue Feb 12, 2018 · 2 comments
Open

User created dont have grant privilege #131

josepharuja opened this issue Feb 12, 2018 · 2 comments

Comments

@josepharuja
Copy link

josepharuja commented Feb 12, 2018

mysqldConfig = aMysqldConfig(v5_7_19)
.withCharset(Charset.LATIN1)
.withPort(port)
.withUser(username, password)
.withTimeZone("Europe/London")
.withTimeout(2, TimeUnit.MINUTES)
.withServerVariable("max_connect_errors", 666)
.build();

    embeddedMysql = anEmbeddedMysql(mysqldConfig)
            .addSchema(SchemaConfig.aSchemaConfig(schemaName).build())
            .start();

    logger.info("MySQL is started with config : {}", embeddedMysql.getConfig().toString());

database starts up successfully and scripts can be run. But the create user don't have GRANT privileges

everything runs except GRANT commands

org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
Migration a.sql failed

SQL State : 42000
Error Code : 1142
Message : GRANT command denied to user 'dev'@'localhost' for table 'y'

@josepharuja josepharuja changed the title User created dont have grant privilige User created dont have grant privilege Feb 12, 2018
@viliusl
Copy link
Collaborator

viliusl commented Feb 27, 2018

@josepharuja - maybe you could share at least part of sql that is failing. It seems you are trying to create users or operate on information_schema because your user has ALL grant on your schema - https://github.com/wix/wix-embedded-mysql/blob/master/wix-embedded-mysql/src/main/java/com/wix/mysql/EmbeddedMysql.java#L82

@josepharuja
Copy link
Author

josepharuja commented Feb 28, 2018

Apologies for a late response.Explained in ticket #133

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