Solved Me again......This time its phpMyAdmin

Currently reading
Solved Me again......This time its phpMyAdmin

76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Hello all,

I thought what a lovely day with the sun out, I'd sit inside and try and continue setting up NextCloud / MariaDB /phpMyAdmin in Docker.

As you may know, I've managed to install (with the help of you all) MariaDB and Nextcloud, however I still have phpMyAdmin to go. Now with this having to link directly with MariaDB in order for NextCloud to work, I wanted to ask yourselves for guidance before I started this time, rather than when I got stuck. I've looked around for the different settings, ie port, volume & environment variables for phpMyAdmin, however I didn't have much look, or when I did, it didn't reflect what I wanted to achieve.

Anyways, I've attached some screenshots of the settings I have for MariaDB and NextCloud, and I would really appreciate guidance so that I can proceed with installing phpMyAdmin and in turn NextCloud.

Thanks in advance.
 

Attachments

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
The only thing you need if you are using the official phpmyAdmin image are 2 variables:

PMA_PORT
PMA_HOST

Port is the port number of your mariaDB instance and host will be your NAS IP address where maria is hosted/installed.
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
The only thing you need if you are using the official phpmyAdmin image are 2 variables:

PMA_PORT
PMA_HOST

Port is the port number of your mariaDB instance and host will be your NAS IP address where maria is hosted/installed.
Hello,

Thank you for replying.

I am using the official image and so I entered those two variables as you suggested, whilst leaving everything else alone.....I didn't change the port number, or add any volume info.

I went to NextCloud and attempted to create an Admin account, entered a username and password, data folder to /docker/nextcloud/data, set database to MySQL/MariaDB, username - root, password set, name - NextCloud, database host - localhost:3306, unfortunately however after 30 seconds or so I get the following error; "Error trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory".

Someone suggested using IP 127.0.0.1 instead of localhost, however when I try that I get the following error; Error while trying to create admin user: Failed to connect to the database: "An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused"
 

Attachments

Last edited:

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Ok this now has no relation to phpnyadmin. It’s used for mariadb or mysql configurations.

What you have here is a cloud configuration error regarding database connection.

Try and use ip address of your nas instead of localhost and see if that will get you further. Rest of the mappings and configuration looks valid (regarding your cloud data folder)
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Ok this now has no relation to phpnyadmin. It’s used for mariadb or mysql configurations.

What you have here is a cloud configuration error regarding database connection.

Try and use ip address of your nas instead of localhost and see if that will get you further. Rest of the mappings and configuration looks valid (regarding your cloud data folder)
Thanks, just tried my IP unfortunately I get a timeout error. On a side note however, if I point my browser to port 3306 (MariaDB) I get a "This page isn't working" message.
 

Attachments

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Don’t expect to get anything via 3306 via browser. that’s a sql port.

Make sure that both containers do work regarding network visibility
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Don’t expect to get anything via 3306 via browser. that’s a sql port.

Make sure that both containers do work regarding network visibility
Just checked phpMyAdmin, and that comes up in my browser ok, albeit I don't have a password to login (one hasn't been set in the environment page).
 

Attachments

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Try root as username and the root sql password that you have defined in the mariadb container variable
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Try root as username and the root sql password that you have defined in the mariadb container variable
That returns; "Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Operation timed out"
 

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
I would say that php and maria can’t see each other
 

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
No there is no need. As long you are certain that maria works on that port and that both containers can talk to each other then it should work. Considering that timeout error I would say there is some sort of network visibility
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
No there is no need. As long you are certain that maria works on that port and that both containers can talk to each other then it should work. Considering that timeout error I would say there is some sort of network visibility
Is there a way I can confirm it is running, other than just going off that Docker says its running?
 

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
you could test it from your computer. Using a terminal or command line.

telnet ipaddressofyournas 3306

Run this and you will see the outcome.
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
you could test it from your computer. Using a terminal or command line.

telnet ipaddressofyournas 3306

Run this and you will see the outcome.
Thanks.

Just used JuiceSSH and got the attached response back.
 

Attachments

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Ok good so the mariadb is working just fine. Now to figure out why php can’t connect to your instance.

So you tried using root account and the defined root password and got that it can’t create that user. that’s a bit odd I have to say. Do you have any files created in the maria docker volume folder?
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Ok good so the mariadb is working just fine. Now to figure out why php can’t connect to your instance.

So you tried using root account and the defined root password and got that it can’t create that user. that’s a bit odd I have to say. Do you have any files created in the maria docker volume folder?
Hi,

There's nothing in the Mariadb docker folder.
 

Attachments

Rusty

Moderator
NAS Support
2,034
616
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Guess that’s because you mounted it wrong.

Mariadb docker image uses this to mount:

Code:
v /my/own/datadir:/var/lib/mysql
So make sure that you mount /var/lib/mysql path and then try again.

1st check the folder if the content is there then it’s f it is access it via php
 
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
Guess that’s because you mounted it wrong.

Mariadb docker image uses this to mount:

Code:
v /my/own/datadir:/var/lib/mysql
So make sure that you mount /var/lib/mysql path and then try again.

1st check the folder if the content is there then it’s f it is access it via php
Hi just logged in and seen your suggestion. Just changed MariaDB volume to;
(File/Folder) /docker/MariaDB
(Mount path) /var/lib/mysql

I've tried creating an Admin NextCloud account again, however I still get error;
"Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Operation timed out"

I've tried different variants in Database host;
localhost:3306
192.168.1.67:3306
127.0.0.1:3306

On that last variant (127.0.0.1:3306) the error changed to;
"Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused"

Lastly, I tried logging into phpMyAdmin using root:rootpassword and it would let me, and so I created an additional user in the environment variables; Admin:rootpassword however that gives me the same error; "mysqli::real_connect(): (HY000/2002): Connection timed out"

Do you think that it may be phpMyAdmin that's setup wrong?
 

Attachments

Last edited:
76
19
NAS
DS916+
Operating system
Windows
Mobile operating system
Android
It's finally working. I kept trying the new user I set in the environment variables (Admin:rootpassword) and it finally went through.

I feel like I'm on the home stretch now.

Everything is running locally just as it should however attempting to access remotely using the reverse proxy I set, is returning the error; "edit the" trusted_domains" setting in config.php". After a quick Google and search around the Docker folder, I found the config.php file and edited it as attached (added my Synology.me address for NextCloud to the array), however it makes no difference and I still get the same error message and it does not let me access remotely.

I have a Letsencrypt certificate created and assigned to that reverse proxy.



***Edit - Finally all working, I just had to remove the port number from the config file for remote access to work.

As always, thanks for your help........until next time. :ROFLMAO:
 

Attachments

Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Top