Skip to content

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

@paulrougieux

Description

@paulrougieux

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions