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

Database Requirements whith --no-setup-db parameter #24651

Closed
wants to merge 6 commits into from

Conversation

Thatoo
Copy link
Contributor

@Thatoo Thatoo commented Jan 31, 2024

In order to gain flexibility to write Dokos install script and packages, the --no-setup-db parameter of the bench new-site command is a very great improvement!

However, in order to free installation from the need of adding to /etc/mysql/my.cnf

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

the command bench new-site with the --no-setup-db parameter should check these requirements :

			"character_set_database": "utf8mb4",
			"collation_database": "utf8mb4_unicode_ci"

and not necessarily the GLOBAL mysql VARIABLES.

With this PR, the following :

sudo mysql -u root -e "CREATE USER '$db_name'@'localhost' IDENTIFIED BY '$db_pwd';"
sudo mysql -u root -e "CREATE DATABASE IF NOT EXISTS $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
sudo mysql -u root -e "GRANT ALL PRIVILEGES ON $db_name . * TO '$db_name'@'localhost';"
sudo mysql -u root -e "FLUSH PRIVILEGES;"

bench new-site $site_name --db-name $db_name --db-password $db_pwd --no-setup-db --admin-password $admin_pwd

could work without changing /etc/mysql/my.cnf .

@Thatoo Thatoo requested a review from a team as a code owner January 31, 2024 17:08
@Thatoo Thatoo requested review from ankush and removed request for a team January 31, 2024 17:08
@Thatoo
Copy link
Contributor Author

Thatoo commented Mar 3, 2024

Please @ankush , could you review my PR?

Copy link

stale bot commented Mar 18, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Mar 18, 2024
@Thatoo
Copy link
Contributor Author

Thatoo commented Mar 18, 2024

Well, this PR only need a review from @ankush to move forward.

@stale stale bot closed this Mar 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant