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

chore(mysql): change mysql auth mode to new default (caching_sha2_password) #3845

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
# this is run in the prebuild state and should be ready when launching a new workspace
- init: |
gp await-port 3306 && ./db/downloadAndCreateDatabase.sh
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';"
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '';"
nvm install
npm install -g yarn
git clone https://github.com/owid/owid-content
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dbtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
# Stock mysql database. Root password is hardcoded for now
db:
image: mysql/mysql-server:latest
command: --default-authentication-plugin=mysql_native_password --log-bin-trust-function-creators=ON
command: --log-bin-trust-function-creators=ON
restart: always
volumes:
- mysql_data_testing:/var/lib/mysql
Expand Down
1 change: 0 additions & 1 deletion docker-compose.devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ services:
# Stock mysql database. Used for grapher database. Root password is hardcoded for now
db:
image: mysql/mysql-server:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- mysql_data:/var/lib/mysql
Expand Down
1 change: 0 additions & 1 deletion docker-compose.grapher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ services:
# Stock mysql database. Root password is hardcoded for now
db:
image: mysql/mysql-server:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- ./devTools/docker/my.cnf:/etc/my.cnf:ro
Expand Down
2 changes: 1 addition & 1 deletion docs/local-database-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If you want to develop on your local system without any Docker containers then y
Remove the password for root by opening the MySQL shell with `mysql` and running:

```sql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '';
```

We do this for convenience so we can run `mysql` commands without providing a password each time. You can also set a password, just make sure you include it in your `.env` file later.
Expand Down