Skip to content

Commit

Permalink
Use our standard script to create database
Browse files Browse the repository at this point in the history
  • Loading branch information
eldering committed Nov 24, 2024
1 parent d962267 commit 5410131
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/jobs/baseinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ password=root
EOF
cat ~/.my.cnf

mysql_root "CREATE DATABASE IF NOT EXISTS \`domjudge\` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql_root "CREATE USER IF NOT EXISTS \`domjudge\`@'%' IDENTIFIED BY 'domjudge';"
mysql_root "GRANT SELECT, INSERT, UPDATE, DELETE ON \`domjudge\`.* TO 'domjudge'@'%';"
mysql_root "FLUSH PRIVILEGES;"
echo 'unused:sqlserver:domjudge:domjudge:domjudge_db-pw+% #$*)@(!/;,.:3306' > /opt/domjudge/domserver/etc/dbpasswords.secret

/opt/domjudge/domserver/bin/dj_setup_database -uroot -proot create-db-users

# Show some MySQL debugging
mysql_root "show databases"
mysql_root "SELECT CURRENT_USER();"
mysql_root "SELECT USER();"
mysql_root "SELECT user,host FROM mysql.user"
echo 'unused:sqlserver:domjudge:domjudge:domjudge_db-pw+% #$*)@(!/;,.:3306' > /opt/domjudge/domserver/etc/dbpasswords.secret
section_end

if [ "${db}" = "install" ]; then
Expand Down

0 comments on commit 5410131

Please sign in to comment.