[MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

Hello, I updated to the latest version and, like before, phpmyAdmin starts but MariaDB does not.

Here is the MariaDB_start.log

Code: Select all

25/03/23 17:31:44 The main volume is /Volume1
25/03/23 17:31:46 Config folder exist at /home/sanctimon/MOD_CONFIG/MariaDB
25/03/23 17:31:49 Database folder at /Volume1/MariaDB_DB
 ERROR! log file
25/03/23 17:32:25 Will use /Volume1 to store config files
25/03/23 17:32:26 The main volume is /Volume1
25/03/23 17:32:26 Config folder exist at /home/sanctimon/MOD_CONFIG/MariaDB
25/03/23 17:32:29 Database folder at /Volume1/MariaDB_DB
httpd (pid 6388) already running
 ERROR! log file
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by outkastm »

have you tried to reboot the NAS or close from SSH the existing process for MariaDB app ?
Or we can try a share screen right now
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

I have just rebooted and same issue.

An additional tip is that the server must be reading the wrong my.cnf:

Code: Select all

[sanctimon@TNAS-17FF bin]# sh +x ./mysqld_safe
230325 18:12:54 mysqld_safe Logging to '/usr/local/mysql/data/TNAS-17FF.err'.
230325 18:12:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/MariaDB/bin/MariaDB/bin/mysqld_safe_helper: Can't create/write to file '/usr/local/mysql/data/TNAS-17FF.err' (Errcode: 2 "No such file or directory")
I apologise I am unavailable now. Do you have time tomorrow?
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by outkastm »

Sorry, also im not available tomorrow

Looking on what you just sent, can be that you have a mixed files from official mysql app installed at /usr/local/mysql and MariaDB
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

Sorry, a bit silly of me, attempted to start mysqld_safe without any arguments.

This is the output of the script:

Code: Select all

bash -x MariaDB start
+ VERSION=10.4.28.2
+ MOD_NAME=MariaDB
++ id -un
+ ROOTUSER=username
+ LOGFILE=/usr/local/MariaDB/MariaDB_start.log
+ service_startup_timeout=100
+ lock_file_path=/tmp/mysql.sock
+ depend=('apache24=2.4.54.2')
+ export depend
+ . /usr/local/MariaDB/functions/dependapps.sh
++ len=1
+ PATH=/usr/local/MariaDB/bin/MariaDB/bin:/usr/local/apache24/sys/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/Volume1/@apps/docker/dockerd/bin
+ export PATH
+ LD_LIBRARY_PATH=/usr/local/apache24/sys/lib:/usr/local/apache24/sys/lib/private:/lib:/lib64:/usr/lib:/usr/lib64/:/usr/local/lib:/usr/local/lib64:/usr/lib/samba
+ export LD_LIBRARY_PATH
+ '[' '!' -L /usr/lib/libncurses.so.5 ']'
+ '[' '!' -L /usr/lib/libtinfo.so.5 ']'
+ USER=mysql
+ GROUP=mysql
+ BINDIR=/usr/local/MariaDB/bin/MariaDB/bin
+ DAEMON=mysqld_safe
+ SHARE_FOLDER=MariaDB_DB
+ case "$1" in
+ start
+ init_config_folder
++ id -un
+ ROOTUSER=username
+ MODCONFIG=/home/username/MOD_CONFIG
+ '[' '!' -d /home/username/MOD_CONFIG ']'
++ stat --format %a /home/username/MOD_CONFIG
+ '[' 755 '!=' 755 ']'
+ LOGFILE=/usr/local/MariaDB/MariaDB_start.log
+ '[' -f /usr/local/MariaDB/MariaDB_start.log ']'
++ stat -c %s /usr/local/MariaDB/MariaDB_start.log
+ '[' 27 -gt 5000 ']'
+ get_vol_name
+ get_main_volume
+ init_cert
+ AddUser mysql
+ AddDataFolder
+ service_prepare
+ '[' 0 -ne 0 ']'
+ _findPID
+ mysqld_pid_file_path=/Volume1/MariaDB_DB/mysqld.pid
+ '[' -f /usr/local/MariaDB/bin/MariaDB.pid ']'
+ echo 'MariaDB start'
MariaDB start
+ chown -RL www-data /usr/local/MariaDB/bin/phpMyAdmin
+ chown -RL mysql /Volume1/MariaDB_DB
+ chown -RL mysql /usr/local/MariaDB/bin/MariaDB
+ SWITCHES=--defaults-file=/usr/local/MariaDB/config/my.cnf
+ /usr/local/apache24/sys/bin/httpd -f /usr/local/MariaDB/config/httpd.conf -k start
+ start-stop-daemon --start --make-pidfile --pidfile /mysqld.pid -b --chdir /usr/local/MariaDB/bin/MariaDB/bin -c mysql --startas /bin/bash -- -c 'exec /usr/local/MariaDB/bin/MariaDB/bin/mysqld_safe --defaults-file=/usr/local/MariaDB/config/my.cnf >> /usr/local/MariaDB/MariaDB_start.log 2>&1'
+ sleep 1
+ wait_for_ready
+ exit 0
It seems to be starting normally with exit 0, but then MariaDB stops (phpmyAdmin keeps on running).
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

When running

Code: Select all

/usr/local/MariaDB/bin/MariaDB/bin/mysqld --defaults-file=/usr/local/MariaDB/config/my.cnf --verbose
MariaDB starts with no issues.
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by outkastm »

made a small update, download again the app and install it
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

Thank you, problem persists.

Here is startup script:

bash -x /etc/init.d/MariaDB start

Code: Select all

bash -x MariaDB start
+ VERSION=10.4.28.2
+ MOD_NAME=MariaDB
++ id -un
+ ROOTUSER=username
+ LOGFILE=/usr/local/MariaDB/MariaDB_start.log
+ service_startup_timeout=100
+ lock_file_path=/tmp/mysql.sock
+ depend=('apache24=2.4.54.2')
+ export depend
+ . /usr/local/MariaDB/functions/dependapps.sh
++ len=1
+ PATH=/usr/local/MariaDB/bin/MariaDB/bin:/usr/local/apache24/sys/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/Volume1/@apps/docker/dockerd/bin
+ export PATH
+ LD_LIBRARY_PATH=/usr/local/apache24/sys/lib:/usr/local/apache24/sys/lib/private:/lib:/lib64:/usr/lib:/usr/lib64/:/usr/local/lib:/usr/local/lib64:/usr/lib/samba
+ export LD_LIBRARY_PATH
+ '[' '!' -L /usr/lib/libncurses.so.5 ']'
+ '[' '!' -L /usr/lib/libtinfo.so.5 ']'
+ USER=mysql
+ GROUP=mysql
+ BINDIR=/usr/local/MariaDB/bin/MariaDB/bin
+ RUNDIR=/usr/local/MariaDB/bin
+ DAEMON=mysqld_safe
+ SHARE_FOLDER=MariaDB_DB
+ case "$1" in
+ start
+ init_config_folder
++ id -un
+ ROOTUSER=username
+ MODCONFIG=/home/username/MOD_CONFIG
+ '[' '!' -d /home/username/MOD_CONFIG ']'
++ stat --format %a /home/username/MOD_CONFIG
+ '[' 755 '!=' 755 ']'
+ LOGFILE=/usr/local/MariaDB/MariaDB_start.log
+ '[' -f /usr/local/MariaDB/MariaDB_start.log ']'
++ stat -c %s /usr/local/MariaDB/MariaDB_start.log
+ '[' 36 -gt 5000 ']'
+ get_vol_name
+ get_main_volume
+ init_cert
+ AddUser mysql
+ AddDataFolder
+ service_prepare
+ '[' 0 -ne 0 ']'
+ _findPID
+ mysqld_pid_file_path=/Volume1/MariaDB_DB/mysqld.pid
+ '[' -f /usr/local/MariaDB/bin/MariaDB.pid ']'
+ read PID1
+ echo 'MariaDB start'
MariaDB start
+ chown -RL www-data /usr/local/MariaDB/bin/phpMyAdmin
+ chown -RL mysql /Volume1/MariaDB_DB
+ chown -RL mysql /usr/local/MariaDB/bin/MariaDB
+ TMPDIR=/Volume1/MariaDB_DB/tmp
+ SWITCHES=--defaults-file=/usr/local/MariaDB/config/my.cnf
+ /usr/local/apache24/sys/bin/httpd -f /usr/local/MariaDB/config/httpd.conf -k start
+ start-stop-daemon --start --make-pidfile --pidfile /usr/local/MariaDB/bin/mysqld.pid -b --chdir /usr/local/MariaDB/bin/MariaDB/bin -c mysql --startas /bin/bash -- -c 'exec /usr/local/MariaDB/bin/MariaDB/bin/mysqld_safe --defaults-file=/usr/local/MariaDB/config/my.cnf >> /usr/local/MariaDB/MariaDB_start.log 2>&1'
+ sleep 1
+ wait_for_ready
+ exit 0
And this is the MariaDB_start.log:

Code: Select all

tail -f MariaDB_start.log
+ i=0
+ test 0 -ne 100
+ /usr/local/MariaDB/bin/MariaDB/bin/mysqladmin --defaults-file=/usr/local/MariaDB/config/my.cnf ping
+ su_kill -0
+ kill -0
+ break
+ log_failure_msg 'log file'
+ echo ' ERROR! log file'
 ERROR! log file
+ return 1
+ GetHomeVolume
+++ df-json
+++ grep /dev/map
+++ awk '{print $1}'
+++ grep -E '(^|\s)/home($|\s)'
++ DEV=/dev/mapper/vg0-lv0
++ mount
++ awk '{print $3}'
++ grep -E '(^|\s)/Volume.($|\s)'
++ grep /dev/mapper/vg0-lv0
+ VOLCONF=/Volume1
++ id -un
+ ROOTUSER=username
+ echo -e '<?php\n$SUPERUSER = '\'username'\'';\n$WEBPATH = '\''/Volume1/htdocs2'\'';\n?>'
+ '[' -z /Volume1 ']'
++ date '+%d/%m/%y %T'
+ echo '25/03/23 23:04:22 Will use /Volume1 to store config files'
25/03/23 23:04:22 Will use /Volume1 to store config files
+ local result=
++ df-json
++ awk '{print $8}'
++ egrep '/Volume[0-9]+$'
+ for item in $(df-json | egrep "/Volume[0-9]+$" | awk '{print $8}')
+ check_main_raid /Volume1
+ local mntpoint=/Volume1
++ cat /Volume1/.main.inc
+ local addr=6c:bf:b5:02:17:ff
++ get_default_addr
+++ ter_defaultmac
++ echo 6c:bf:b5:02:17:ff
+ '[' 6c:bf:b5:02:17:ff = 6c:bf:b5:02:17:ff ']'
+ return 0
+ '[' 0 -ne 0 ']'
+ result=/Volume1
+ break
+ '[' -z /Volume1 ']'
++ date '+%d/%m/%y %T'
+ echo '25/03/23 23:04:24 The main volume is /Volume1'
25/03/23 23:04:24 The main volume is /Volume1
+ MAIN_VOLUME=/Volume1
+ CERT_PATH=/etc/ssl/certs
+ ter_curl -k --etag-compare /etc/ssl/certs/etag.txt --etag-save /etc/ssl/certs/etag.txt -o /etc/ssl/certs/cacert.pem --remote-name https://curl.se/ca/cacert.pem
+ ln -sf /etc/ssl/certs/cacert.pem /etc/ssl/certs/ca-certificates.crt
+ ln -sf /etc/ssl/certs/cacert.pem /etc/ssl/certs/ca-bundle.crt
+ local username=mysql
+ id mysql
+ '[' 0 -ne 0 ']'
++ getent group mysql
+ '[' mysql:x:1009:mysql ']'
+ id mysql
+ grep '(mysql)'
+ '[' 0 -ne 0 ']'
+ MODCONFIGPATH=/home/username/MOD_CONFIG/MariaDB
+ '[' -d /home/username/MOD_CONFIG/MariaDB ']'
+ '[' '!' -L /home/username/MOD_CONFIG/MariaDB ']'
++ date '+%d/%m/%y %T '
+ echo '25/03/23 23:04:24 Config folder exist at /home/username/MOD_CONFIG/MariaDB'
25/03/23 23:04:24 Config folder exist at /home/username/MOD_CONFIG/MariaDB
+ '[' '!' -L /usr/local/MariaDB/config ']'
++ readlink -- /usr/local/MariaDB/config
+ '[' /home/username/MOD_CONFIG/MariaDB '!=' /home/username/MOD_CONFIG/MariaDB ']'
+ '[' '!' -L /home/username/MOD_CONFIG/MariaDB/MariaDB_start.log ']'
+ df-json
+ grep /home
+ '[' 0 -ne 0 ']'
++ ter_share_add -name MariaDB_DB -owner mysql
+ DATAPATHFULL=/Volume1/MariaDB_DB
+ '[' -z /Volume1/MariaDB_DB ']'
++ echo /Volume1/MariaDB_DB
++ awk -F/ '{print $2}'
+ DATAVOL=Volume1
+ MAINTMPDIR=/Volume1/tmp
+ echo DATAPATHFULL=/Volume1/MariaDB_DB
+ echo DATAVOL=/Volume1
+ echo MODCONFIGPATH=/home/username/MOD_CONFIG/MariaDB
+ echo TEMPDIR=/Volume1/tmp
+ echo MAIN_VOLUME=/Volume1
+ echo HOME_VOLUME=/Volume1
+ ln -sf /etc/ssl/certs/cacert.pem /usr/local/apache24/sys/etc/certs/ca-bundle.crt
+ ln -sf /etc/ssl/certs/cacert.pem /usr/local/apache24/sys/ssl/cert.pem
+ ln -sf /etc/ssl/certs/cacert.pem /usr/local/apache24/etc/ssl/cert.pem
+ '[' '!' -d /Volume1/tmp ']'
++ stat --format %a /Volume1/tmp
+ '[' 777 '!=' 777 ']'
+ '[' '!' -L /Volume1/MariaDB_DB/tmp ']'
+ '[' '!' -d /Volume1/MariaDB_DB/mysql ']'
+ '[' '!' -f /usr/local/MariaDB/bin/MariaDB/my.cnf ']'
+ cp -af /usr/local/MariaDB/bin/my.cnf /usr/local/MariaDB/config
+ sed -i 's/Volume1\/MariaDB_DB/Volume1\/MariaDB_DB/g' /usr/local/MariaDB/config/my.cnf
+ echo -e '<?php\n$DATAPATH = '\''/Volume1/MariaDB_DB'\'';\n?>'
++ date '+%d/%m/%y %T'
+ echo '25/03/23 23:04:27 Database folder at /Volume1/MariaDB_DB'
25/03/23 23:04:27 Database folder at /Volume1/MariaDB_DB
+ '[' -f /usr/local/MariaDB/config/httpd.conf ']'
+ sed -i 's/\/Volume1/\/home\/username/g' /usr/local/MariaDB/config/httpd.conf
+ '[' '!' -f /home/username/MOD_CONFIG/MariaDB/httpd.conf ']'
+ '[' '!' -f /home/username/MOD_CONFIG/MariaDB/httpd-ssl.conf ']'
+ '[' '!' -f /home/username/MOD_CONFIG/MariaDB/php.ini ']'
+ '[' '!' -d /home/username/MOD_CONFIG/MariaDB/plugin ']'
+ '[' '!' -f /usr/local/MariaDB/bin/config/phpmyadmin_config.inc.php ']'
+ cp -f /usr/local/MariaDB/bin/phpmyadmin_config.inc.php /usr/local/MariaDB/config
+ rm -f /usr/local/MariaDB/bin/phpMyAdmin/config.inc.php
+ ln -sf /usr/local/MariaDB/config/phpmyadmin_config.inc.php /usr/local/MariaDB/bin/phpMyAdmin/config.inc.php
+ '[' -f /usr/local/MariaDB/bin/access_log ']'
++ stat -c %s /usr/local/MariaDB/bin/access_log
+ '[' 168 -gt 5000 ']'
+ '[' -f /usr/local/MariaDB/bin/error_log ']'
++ stat -c %s /usr/local/MariaDB/bin/error_log
+ '[' 51 -gt 5000 ']'
httpd (pid 1462) already running
+ i=0
+ test 0 -ne 100
+ /usr/local/MariaDB/bin/MariaDB/bin/mysqladmin --defaults-file=/usr/local/MariaDB/config/my.cnf ping
+ su_kill -0
+ kill -0
+ break
+ log_failure_msg 'log file'
+ echo ' ERROR! log file'
 ERROR! log file
+ return 1
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by outkastm »

can you share the content of your my.cnf ? Also the log file /Volume1/MariaDB_DB/mysqld.err

if you get them from ssh, get them with cat

Code: Select all

cat /Volume1/MariaDB_DB/mysqld.err
and

Code: Select all

cat /usr/local/MariaDB/config/my.cnf
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [MariaDB] MariaDB+phpMyAdmin MySQL Server Fork

Post by sanctimon »

This is the output of cat /Volume1/MariaDB_DB/mysqld.err:

https://pastebin.com/3KPTyYfx

This is the my.cnf from

Code: Select all

cat /usr/local/MariaDB/config/my.cnf
:

Code: Select all

[mysqld]
log-error=/Volume1/MariaDB_DB/mysqld.err
pid-file=/Volume1/MariaDB_DB/mysqld.pid

[client]
# TCP port to use to connect to mysqld server
port=3307
# Socket to use to connect to mysqld server
socket=/tmp/mysql.sock
[mariadb]
# TCP port to make available for clients
port=3307
#  Socket to make available for clients
socket=/tmp/mysql.sock
# Where MariaDB should store all its data
datadir=/Volume1/MariaDB_DB
basedir=/usr/local/MariaDB/bin/MariaDB
user=mysql
plugin-dir=/Volume1/MariaDB_DB/plugin
Post Reply