• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Can't get MySQL 8 in docker container available for other applications

SiegbertG

Basic Pleskian
Hello,

i am using Plesk on a Linux-System runnung MySQL 5.7 and don't want to change it because i don't know if all used applications are able to work with MySQL 8.

But now i tried to get Nextcloud running. Nextcloud neeed a newer MySQl and so i thougt it would be the best to set up MySQL 8 in a Docker-container and use this version for Nextcloud.
This is my configuration:
  • mySQL 8 with standard parameters and potmapping 3306 -> 3307 and 33060 -> 33070
I can call a dcoker-bash for the container with "docker exec -it mysql bash" and in this bash i can use MySQL, create users, create Datenbase and so on. I created a user named nc and i can log into MySQL with this user and crate a datebase named nc from this login. So there is a working database nc with a user nc.
root@h2386003:~# docker exec -it mysql bash
root@ba6171cb9c6e:/# mysql -u nc -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 8.0.27 MySQL Community Server - GPL

lsof shows me, that Docker is listening on port 3307:
docker-pr 9991 root 4u IPv4 1039308961 0t0 TCP *:33070 (LISTEN)
docker-pr 9998 root 4u IPv6 1039273738 0t0 TCP *:33070 (LISTEN)
docker-pr 10012 root 4u IPv4 1039302047 0t0 TCP *:3307 (LISTEN)
docker-pr 10020 root 4u IPv6 1039284601 0t0 TCP *:3307 (LISTEN)

But nextcloud-installer didn't use or didn't find this MySQL-service. I choose MySQL-Datebase, users nc with the passwort for nc, database nc and tried localhost:3307 and 127.0.0.1:3307.
1640849671878.png
I get this error:
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'nc'@'localhost' (using password: YES)
Then i tried to access the MySQL -Docker with phpMySQLAdmin.
  • install phpMySQLAdmin from Docker-Hub
  • leave all standards an add PMA_HOST 127.0-0-1 and PMA_PORT 3307
Error: mysqli::real_connect(): (HY000/2002): Connection refused
Whe i use localhost / 33ß7 i get "no such file or directory".

What is wrong in my configuration of MySQL in the docker-container?

best regards
Siegbert
 
Can you connect to your MySQL instance from the Plesk server with

# mysql -h 127.0.0.1 -P 3307 -u nc -p

Looks like nc user is not granted all necessary permissions.
 
Solve it: I have to create the mySQL user with 'create username identified by password' without a host. Not 'create username@hostname'

The problem was, that MYSQL searches in usertsble for usernane AND host.
 
Back
Top