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

mysql credentials config #24

Closed
wants to merge 1 commit into from
Closed

mysql credentials config #24

wants to merge 1 commit into from

Conversation

Huahan98
Copy link
Contributor

Change username and password in ./Autolab/config/database.yml according to the credentials user provided in docker-compose.yml (as part of the make command), so there is only one file that the user needs to change without having to navigate to the Autolab submodule.

How to test:

  1. checkout docker-mysql-credentials branch in Autolab
  2. change MYSQL_USER and MYSQL_PASSWORD in docker-compose.yml to customized credentials
  3. make clean && make, check that ./Autolab/config/database.yml has the right credentials

@fanpu
Copy link
Contributor

fanpu commented Dec 1, 2020

I changed MYSQL_USER to fanpu and I am getting the following when trying to connect to the db from within the Autolab container:

root@9350bb0fe99f:/home/app/webapp# RAILS_ENV=production bundle exec rails c
Loading production environment (Rails 5.2.0)
2.6.6 :001 > User.first
Traceback (most recent call last):
        1: from (irb):1
Mysql2::Error (Access denied for user 'fanpu'@'172.18.0.6' (using password: YES))

When I dumped the users from the mysql container it looks like the new user was not created:

mysql> SELECT user FROM mysql.user;
+------------------+
| user             |
+------------------+
| user             |
| healthchecker    |
| mysql.infoschema |
| mysql.session    |
| mysql.sys        |
| root             |
+------------------+
6 rows in set (0.00 sec)

It seems like we need to make the MySQL docker aware of these new changes somehow, is there a way of doing that?

@Huahan98 Huahan98 closed this Feb 1, 2021
@damianhxy damianhxy deleted the mysql-credentials branch August 3, 2023 15:04
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

Successfully merging this pull request may close these issues.

None yet

2 participants