mirromutth/mysql-action

Access denied for user 'root'@'localhost'

Closed this issue · 2 comments

Hi there.

I'm getting access denied using the following config:

test:
    runs-on: ubuntu-latest
    steps:
      - uses: mirromutth/mysql-action@master
        with:
          mysql version: '8.0'
          mysql root password: rootpass
          host port: 3889
          container port: 3889
      - run: mysql --port 3889 -u root -prootpass -e 'CREATE DATABASE IF NOT EXISTS test;'

The error is the following:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Where did I go wrong? Thanks

Instead I got

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

with similar script. @thomasjensen1194 how did you solve the problem? Thanks in advance!

@ichn-hu Try addind -h 127.0.0.1 to force the client to use TCP instead of the socket file.