Skip to content

Commit

Permalink
ci(mariadb): uninstall pre-installed mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 12, 2024
1 parent dd9cc68 commit bc13e23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Uninstall default MySQL
if: matrix.os == 'ubuntu-latest'
run: |
sudo service mysql stop
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
sudo apt-get autoremove -y
sudo apt-get autoclean
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql
sudo deluser mysql
sudo delgroup mysql
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion mariadb/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn setup() -> Result<String, Error> {
.with_exec(vec!["touch ~/.my.cnf"])?
.with_exec(vec!["[ -d $MYSQL_DATADIR/sys ] || flox activate -- mysql_install_db --auth-root-authentication-method=normal --user=`whoami` --datadir=$MYSQL_DATADIR --pid-file=$MYSQL_HOME/mysql.pid --defaults-file=~/.my.cnf"])?
.with_exec(vec![
"grep -q mariadb Procfile || echo 'mariadb: mysqld --datadir=$MYSQL_DATADIR --log-error=$MYSQL_HOME/mysql.log --port=$MYSQL_PORT --socket=$MYSQL_HOME/mysql.socket --defaults-file=$HOME/.my.cnf' >> Procfile",
"grep -q mariadb Procfile || echo 'mariadb: mysqld --datadir=$MYSQL_DATADIR --log-error=$MYSQL_HOME/mysql.log --port=$MYSQL_PORT --socket=$MYSQL_HOME/mysql.socket' >> Procfile",
])?
.stdout()?;

Expand Down

0 comments on commit bc13e23

Please sign in to comment.