Access denied for mysql database

Post Reply
psp50
Posts: 26
Joined: Tue Oct 26, 2021 9:57 am

i want to access mysql database but i got problem in it.

here is my command line

Code: Select all

root@supla:~# docker exec -it supla-db bash
root@5392d9096538:/# mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@5392d9096538:/# mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@5392d9096538:/#
what is default password for mysql database.

Please help me to connect to mysql database.
User avatar
pzygmunt
Posts: 18282
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Just type "mysql"
psp50
Posts: 26
Joined: Tue Oct 26, 2021 9:57 am

pzygmunt wrote: Mon Nov 22, 2021 10:55 am Just type "mysql"
Got same problem.

Code: Select all

root@supla:~# docker exec -it supla-db bash
root@5392d9096538:/# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@5392d9096538:/#
all people facing the same problem?
It is hosted on digital ocean.
psp50
Posts: 26
Joined: Tue Oct 26, 2021 9:57 am

Can anybody help me with this?
User avatar
pzygmunt
Posts: 18282
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

docker exec -it supla-cloud bash
cat /var/www/cloud/app/config/parameters.yml - Here you will find your database access credentials.
psp50
Posts: 26
Joined: Tue Oct 26, 2021 9:57 am

Thank you so much for your support.

now I'm able to access the database on host "supla-db"
but here I can not able to access it on localhost.
how can I access outside of localhost?

when I try to add user to the database i got error of privileges.

Any solution for that?
User avatar
pzygmunt
Posts: 18282
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

You must grant the appropriate permissions in SQL and make port 3306 available outside the container.
Post Reply

Return to “Help”