mysql-action
mysql-action copied to clipboard
I want to configure root with empty password, what can I do?
my config:
- uses: mirromutth/[email protected]
with:
mysql user: 'root'
mysql password: 'test'
but failed when I login with root and empty password
i have the same issue
Both root password and superuser are empty, must contains one superuser
I solved this by first setting a password and then removing it afterwards, e.g.:
[...]
- uses: mirromutth/[email protected]
with:
mysql version: 5.7
mysql root password: root
- name: Reset mysql password
run: |
# To prevent "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0"
# See: https://github.com/mirromutth/mysql-action/issues/16
sleep 15
cat <<EOF | mysql -h 127.0.0.1 -u root --password=root
UPDATE mysql.user SET authentication_string = null WHERE user = 'root';
FLUSH PRIVILEGES;
EOF
[...]
Thanks @dansimau . I will try that too but it really should allow root with no password.
It's funny because despite your comment I got
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
lol. There has to be a better way.
This guy made a fork that allows empty root password: https://github.com/samin/mysql-action