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

I want to configure root with empty password, what can I do? #17

Open
JimmyShi22 opened this issue Nov 5, 2020 · 5 comments
Open

I want to configure root with empty password, what can I do? #17

JimmyShi22 opened this issue Nov 5, 2020 · 5 comments

Comments

@JimmyShi22
Copy link

JimmyShi22 commented Nov 5, 2020

my config:

      - uses: mirromutth/[email protected]
        with:
          mysql user: 'root'
          mysql password: 'test'

but failed when I login with root and empty password

@drodriguesj
Copy link

i have the same issue

Both root password and superuser are empty, must contains one superuser

@dansimau
Copy link

dansimau commented Feb 10, 2021

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

[...]

@jasonperrone
Copy link

Thanks @dansimau . I will try that too but it really should allow root with no password.

@jasonperrone
Copy link

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.

@jasonperrone
Copy link

This guy made a fork that allows empty root password: https://github.com/samin/mysql-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants