Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom configure credentials + dbname #8

Closed
v-dev opened this issue Dec 17, 2013 · 17 comments
Closed

custom configure credentials + dbname #8

v-dev opened this issue Dec 17, 2013 · 17 comments

Comments

@v-dev
Copy link

v-dev commented Dec 17, 2013

Hello,

Another request / question, please. Is there a way to configure custom username, password, and dbname? For example, something like this?:

                        <configuration>
                            <port>${mysql.port}</port>
                            <data>${project.build.directory}/mysql-data</data>
                            <user>myuser</user>
                            <password>mypassword</password>
                            <dbname>otherthanroot</dbname>
                        </configuration>
@yegor256
Copy link
Member

I was expecting that :) Yes, it's possible to do. Give me a day or two..

@v-dev
Copy link
Author

v-dev commented Dec 17, 2013

Figured you would. =)

@dmarkov
Copy link

dmarkov commented Jan 15, 2014

@longtimeago the task is for you now, follow these guidelines. Don't hesitate to ask any technical questions right here

@dmarkov
Copy link

dmarkov commented Jan 15, 2014

@longtimeago The budget of this issue is 30 mins, which is exactly how much will be paid when the task is done (see this for explanation)

@longtimeago
Copy link
Contributor

@yegor256 Hi, Yegor
For this task API of Instances should be refactored. My opinion is that Instances.start() and Instances.stop should have one parameter Config:

Config {
   String user;
   String password;
   String dbname;
   int port;
   String options;
...
}

Config instance would be created in AbstractMysqlMojo during call to execute()

But this might take a bit longer than 30 mins

@longtimeago
Copy link
Contributor

@yegor256 What do you think about my thoughts above?

@yegor256
Copy link
Member

Yes, I think it's a good idea. Let's use PDD, as usual :)

longtimeago pushed a commit to longtimeago/jcabi-mysql-maven-plugin that referenced this issue Jan 19, 2014
longtimeago pushed a commit to longtimeago/jcabi-mysql-maven-plugin that referenced this issue Jan 20, 2014
ghost pushed a commit that referenced this issue Jan 21, 2014
#14: pull request Issue #8 Custom configure credentials + dbname are available
@longtimeago
Copy link
Contributor

@yegor256 Do we need to do something to close this issue?

@yegor256
Copy link
Member

I'll release a new version today, then we'll ask @v-dev to review it and close the issue

@yegor256
Copy link
Member

@v-dev version 0.6 was released to Maven Central. Please try it, as explained in http://mysql.jcabi.com/example-credentials.html If everything works as you explected, please close this issue.

@v-dev
Copy link
Author

v-dev commented Jan 23, 2014

Ok will do - thanks!

@v-dev
Copy link
Author

v-dev commented Jan 23, 2014

It doesn't seem to be working? I'm getting mysqladmin.exe: unable to change password:

...
[INFO] >>
[INFO] $ C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqld.exe --no-defaults --general_log --console --innodb_buffer_pool_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 --binlog
-ignore-db=testdb --basedir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist --lc-messages-dir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\share --datadir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\da
ta --tmpdir=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\temp --socket=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.sock --pid-file=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.pid --port
=43444
[INFO] port 43444 is available after 0ms of waiting
[INFO] $ C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe --no-defaults --port=43444 --user=user --socket=C:\dev\temp\mvn-mysql-plugin-test\target\mysql-data\mysql.sock --host=127.0.0.1 password pas
sword
[INFO] >> C:\dev\temp\mvn-mysql-plugin-test\target\mysql-dist\bin\mysqladmin.exe: unable to change password; error: 'Can't find any matching row in the user table'
[ERROR] #start('Config(tcpport=43444, dbuser=user, dbpassword=password, name=testdb, dbopts=[])', C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-dist, C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-data): throw
n java.lang.IllegalArgumentException(Non-zero exit code 1: \u0007C:\\dev\\temp\\mvn-mysql-plugin-test\\target\\mysql-di..54..n't find any matching row in the user table') out of com.jcabi.log.VerboseProcess#stdout[191] i
n 18s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...

@v-dev
Copy link
Author

v-dev commented Jan 23, 2014

You can pull down my test project and try it yourself:
https://github.com/v-dev/mvn-mysql-plugin-test/tree/features/test-custom-mysql-credentials

mvn clean verify

@yegor256
Copy link
Member

Could you please close this issue and submit a new one with a full description of the problem? Thanks!

@v-dev
Copy link
Author

v-dev commented Jan 23, 2014

Sure.

@v-dev v-dev closed this as completed Jan 23, 2014
@dmarkov
Copy link

dmarkov commented Jan 23, 2014

@longtimeago Thanks a lot, I just topped your account for 30 mins, transaction ID DA2128884

@dmarkov
Copy link

dmarkov commented Nov 10, 2014

in progress: 8-aea18ffe

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

No branches or pull requests

4 participants