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

Access denied for user 'root'@'localhost' #3

Closed
thjendk opened this issue Oct 1, 2019 · 2 comments
Closed

Access denied for user 'root'@'localhost' #3

thjendk opened this issue Oct 1, 2019 · 2 comments

Comments

@thjendk
Copy link

thjendk commented Oct 1, 2019

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

@thjendk thjendk changed the title Access denied Access denied for user 'root'@'localhost' Oct 1, 2019
@thjendk thjendk closed this as completed Oct 4, 2019
@ichn-hu
Copy link

ichn-hu commented Feb 7, 2020

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!

@fpalamour
Copy link

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

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

3 participants