question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access denied for user 'root'@'localhost' (using password: NO)

See original GitHub issue

I used Mobius_Docker, but I can’t get it to work. When it’s started, I get repeatedly the following output

node_1  | GET : /Mobius
node_1  |
node_1  | GET : /Mobius
node_1  | get_resource_from_url (hokpoASd) - /Mobius: 2.846ms
node_1  | get_resource_from_url (z_wpz8jS) - /Mobius: 3.322ms
node_1  | {"rsc":"5000","ri":"GET-/Mobius-{\"fu\":2,\"rcn\":1,\"rt\":3}","msg":"database error"}
node_1  | Target CSE(localhost) is not ready
node_1  | Target CSE(localhost) is not ready
node_1  | {"rsc":"5000","ri":"GET-/Mobius-{\"fu\":2,\"rcn\":1,\"rt\":3}","msg":"database error"}

Since the message says database error, I looked what the database does and at the end of the database setup it says

db_1    | 2020-01-16T15:00:53.686717Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)

So, I am wondering how I could fix the issue. I already tried it on another PC, on Linux and Windows and also followed the steps for manual installation from the installation guide. I always get a database error. I also tried different solutions I found on the internet for the Access denied error, but nothing seems to work for me.

I would really appreciate some help here, since I ran out of options to try.

The version of MySQL is 5.7.28.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
hsebscommented, Jan 25, 2020

@mKay00 I found the cause. healthcheck command of Mobius_Docker is wrong.

image

Command should include password.

image

Change line 18 of docker-compose.yml in Mobius Docker from

test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]

to

test: ["CMD", "mysqladmin" , "--password=dksdlfduq2","ping", "-h", "localhost"]
1reaction
lovele0107commented, Jan 23, 2020

HI , I confirm it is working now. The rights of the sql file would need to be changed in order to be in the same user group. ( or do not use sudo for copying the sql file) Thank you very much for your prompt reply to this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access denied for user 'root@localhost' (using password:NO)
Some times it just happens due to installation of Wamp or changing of password options of root user. One can use ...
Read more >
How to Fix MySQL Error: Access denied for user root@localhost
Enter your password at the prompt. A MySQL shell loads.
Read more >
How to Fix MySQL Error: Access Denied for User 'root ...
If you get the “access denied” error, one way to solve it is by using sudo to log in to mysql and change...
Read more >
Access denied for user 'root@localhost' (using password: NO)
When you install MySQL and try to access it from your local machine as root, you may encounter this error . ... When...
Read more >
mysql how to fix Access denied for user 'root'@'localhost'
Try accesing the server with 'root'@'127.0.0.1' which is diferent from 'root'@'localhost'. Then issue a command to create the user 'root'@'localhost' and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found