Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unable to login to mysql container after installing, should it be this confusing?

Featured Replies

I first tried installing mysql from the Docker repository as explained on a few different youtube videos, but that failed every time.  So, I went with the Bungy's Repository version, installed it with what I thought was a simple process, but after the container fires up, in the console and from any SQL tools, I'm denied access.

 

In console if I type `mysql -u root -p` then enter the root password as I defined it during installation, I'm given the big "Access denied for user 'root'@'localhost' (using password: YES)"

 

Stumped.  What am I doing wrong?

I'm definitely not a SQL guy (always used MariaDB for whatever has required a SQL db in the past), but I find it interesting that even on the sample installation method listed on the registry for MySQL

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag

The same error results.

  • Community Expert

Working for me, one thing to note is you can only set the root password the first time, maybe some volume/appdata folder needs to be nuked?

 

Run command used for test

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest

 

Successful login using ENV set in template / run cmd

root@fortytwo:~# docker exec -it some-mysql sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"'
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.28 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.02 sec)

mysql> EXIT
Bye

 

Successful login via CLI passing password

root@fortytwo:~# docker exec -it some-mysql bash
root@a6a52d23fe48:/# mysql -uroot -pmy-secret-pw
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.28 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.01 sec)

mysql> exit
Bye

 

Successful login via CLI entering password manually

root@fortytwo:~# docker exec -it some-mysql bash
root@a6a52d23fe48:/# mysql -uroot -p            
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 8.0.28 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql> 

 

Edited by tjb_altf4

  • Author

Well, I managed to get it installed and was able to login as root, but then, even after granting full permissions to a new user from any host, the port 3306 is not open on the system and I can't figure out how to open it up so I can connect from my remote laptop.

5 hours ago, arretx said:

remote

You need to forward the port on the router.  Although I'd personally be hesitant forwarding 3306 to 3306 as that port is probably going to be subject to a lot of automated hack attempts.

  • Author

Not remote as in WAN.  Remote as in not localhost. 

Shouldn't be an issue so long as you reference the server's IP (host or bridge network mode) - 192.x and not the container's internal IP (172.x)

  • 1 year later...

Hi when I go to log into the MySQL root it hangs at enter password, the keyboard keys wont enter anything just sits blank. I tried with MariaDB and MariaDB official. Are either ok to use or is one preferred for Nextcloud?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.