Skip to content

Conversation

@rimi-itk
Copy link
Contributor

@rimi-itk rimi-itk commented May 28, 2024

Updates the itkdev-docker-compose sql:connect command to run mysql inside the database container rather than assuming we have mysql installed on our local machine1:

Before:

$ itkdev-docker-compose sql:connect
mysql --host=0.0.0.0 --port=53661 --user=db --password=db db
$ $(itkdev-docker-compose sql:connect)
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it

After:

$ itkdev-docker-compose sql:connect
docker compose exec mariadb mysql --user=db --password=db db
$ $(itkdev-docker-compose sql:connect)
Welcome to the MariaDB monitor.  Commands end with ; or \g.
…

Furthermore, a new command, itkdev-docker-compose sql:cli, is introduced. This command allows us to easily drop into a MySQL session:

$ itkdev-docker-compose sql:cli
Welcome to the MariaDB monitor.  Commands end with ; or \g.
…

or send SQL commands to the database:

bash-5.2$ itkdev-docker-compose sql:cli <<< 'SHOW TABLES' 
Tables_in_db
actions
advagg_aggregates
…

Footnotes

  1. We probably have, but we don't need to.

@rimi-itk rimi-itk marked this pull request as ready for review May 28, 2024 13:50
@rimi-itk rimi-itk requested a review from cableman May 28, 2024 13:50
@rimi-itk rimi-itk force-pushed the feature/mysql-in-docker branch from 1504f88 to c52a380 Compare June 4, 2024 08:29
@rimi-itk rimi-itk force-pushed the feature/mysql-in-docker branch from c52a380 to 96507ac Compare August 21, 2024 08:08
@rimi-itk rimi-itk force-pushed the feature/mysql-in-docker branch from 96507ac to 5d51bac Compare November 26, 2024 15:19
@rimi-itk rimi-itk force-pushed the feature/mysql-in-docker branch from 5d51bac to 47151cd Compare February 6, 2025 10:00
@rimi-itk rimi-itk requested review from jekuaitk and turegjorup March 19, 2025 11:57
@cableman cableman merged commit a720f34 into develop Apr 3, 2025
7 checks passed
@cableman cableman deleted the feature/mysql-in-docker branch April 3, 2025 06:56
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.

3 participants