I am trying to make a github actions pipeline for a frappe project and I am using github runners. So I have to go throughout the frappe setup on every push.
all the steps are working except for the mariaDB setup , I am facing an issue regarding the setup of the db root default password as the pipeline is happening in a non-interactive mode, I have no prompt for setting this password.
I’ve tried so many approaches to do this
`export DEBIAN_FRONTEND=noninteractive sudo debconf-set-selections <<< 'mariadb-server-10.3 mysql-server/root_password password myPassword' sudo debconf-set-selections <<< 'mariadb-server-10.3 mysql-server/root_password_again password myPassword'
Approach 2 : change the password after install
sudo systemctl stop mariadb sudo mysqld_safe --skip-grant-tables & mysql -u root <<<" use mysql; update user SET PASSWORD=PASSWORD("myPassword") WHERE USER='root'; flush privileges; exit sudo systemctl start mariadb
But when I run
bench new-site example.com --mariadb-root-password myPassword --admin-password myAdminPassword
I get this error:
Access Denied for User 'root'@'localhost' (using password: YES)
Is there any better approach to do this please? knowing that if I use a mariaDB service in my pipeline I will have to append the
/etc/mysql/my.cnf to allow it to work with frappe.
Thanks a lot !