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 #24150

Closed
wants to merge 2 commits into from

Conversation

Thatoo
Copy link
Contributor

@Thatoo Thatoo commented Jan 6, 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 6, 2024 21:21
@Thatoo Thatoo requested review from ankush and removed request for a team January 6, 2024 21:21
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (232da65) 60.37% compared to head (6c1ee09) 60.37%.
Report is 316 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24150   +/-   ##
========================================
  Coverage    60.37%   60.37%           
========================================
  Files          775      775           
  Lines        78714    78719    +5     
  Branches      6368     6368           
========================================
+ Hits         47524    47529    +5     
  Misses       27489    27489           
  Partials      3701     3701           
Flag Coverage Δ
server 71.20% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link

stale bot commented Jan 26, 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 Jan 26, 2024
@Thatoo
Copy link
Contributor Author

Thatoo commented Jan 31, 2024

In order to resolve Semantic commits and commitlint issue, I close this PR in favor of #24651

@Thatoo Thatoo closed this Jan 31, 2024
@Thatoo Thatoo deleted the requirements_yunohost branch February 1, 2024 07:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 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

2 participants