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

Document default database name in the RMySQL::mysqlHasDefault() function #209

Open
paulrougieux opened this issue Jul 13, 2017 · 0 comments

Comments

@paulrougieux
Copy link

paulrougieux commented Jul 13, 2017

This RMySQL package is being phased out, but the RMySQL::mysqlHasDefault() function is not present in the new RMariaDB.

I have spent some time figuring out how to setup a test database for testthat and I just wanted to specify that the default database used by RMySQL::mysqlHasDefault() has to be called "test". Other database names return an error Could not initialise default MySQL database.

Here is how I created the test database :

$ mysql -u root -p

Then give the following mysql commands:

mysql> create database test;
mysql> connect test;
mysql> grant all privileges on * . * to R@localhost;

And the configuration in ~/.my.cnf

#    [rs-dbi]
#    user = R
#    password = ***
#    host = localhost
#    database = test

Then RMySQL::mysqlHasDefault() returns TRUE.

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

No branches or pull requests

1 participant