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

Creation of MariaDB container fails if db/container name contains a dash #9

Open
bdconnolly opened this issue Sep 8, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@bdconnolly
Copy link

bdconnolly commented Sep 8, 2020

Repo:

  1. Click on menu item to create a new MariaDB container
  2. In DB/Container name field use a name with a dash. For example "test-database"
  3. In DB Username field enter a username
  4. In DB Password field enter a password
  5. Complete other required fields in the database
  6. Hit the Submit button

What should happen:
A new database container is created with the name entered in 2) above. Using the username and password entered above you should be able to access it with a command similar to

mysql --host mydb --port 32246 --user test-database --password

What happens:
A new database container is created with the name entered in 2) above. Using the username and password entered above you are unable to login. You see a message similar to

mysql --host mydb --port 32246 --user testuser --password
Enter password:
ERROR 1045 (28000): Access denied for user 'testuser'@'rhino02.fhcrc.org' (using password: YES)

After debugging the problem on the db4sci server, I was able to determine the problem is with the password. The DB container is created correctly. The DB is created correctly and the user is created, however the password does not work. When the password is changed, the user is able to access the DB.

@bdconnolly bdconnolly added the bug Something isn't working label Sep 8, 2020
@dtenenba
Copy link

dtenenba commented Sep 8, 2020

I mentioned in another issue that dashes are not allowed in mysql/mariadb database names. So the real issue is that mydb is not doing the proper validation/error handling to prevent names with dashes from being used.

@dtenenba
Copy link

dtenenba commented Sep 8, 2020

Actually, I am having trouble finding a reference for my statement above (that dashes are not allowed in database names). I wonder if the dash throws off the parsing of the command line so that it interprets some other argument as the password....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants