MariaDB Server Status Shows "Stopped"
This is a bug in the server feature associated to the database. This applies to F21 only. The service is correctly created, the monit file is also accurate, but the database entry appears to be incorrect.
In hda_production, servers table the name=mariadb. As a result, the server status reflects "Stopped" in the Settings, Server tab. If you change name=mysql and refresh Settings, Server tab then it will show as "Running". The SQL below corrects the issue:
echo "update servers set name='mariadb' where comment='MariaDB Server'" | mysql -uroot -phda hda_production
In earlier version of the F21 platform, it was listed as name=mysql, comment=MySQL DB Server, and pid=mysqld/mysqld.pid. Now everything reflect MariaDB vs MySQL. This appears to be a recent change in the latest platform.
#3 Updated by cpg about 6 years ago
- Status changed from Assigned to Feedback
- Assignee changed from cpg to bigfoot65
i looked into this. the proposed work-around, while it appears to turn the green light on, it does not work well.
the reason is that changing the name of the service will cause monit to keep on trying to start a "mysql" service (which, if anything, it ought to be "mysqld", not "mysql" above).
the real issue is that the PID file is read-protected, so it cannot be read by the platform, which then proceeds to try more fuzzy ways to see if the process for this service is running.
because of the above, i would not recommend this work-around or fixing this at this time prior to release.
let's revisit because there is no information in our data to indicate it is in any way related to mysql, which we thought it was out the door completely.
#8 Updated by austwhite over 5 years ago
IS there any update. I have just recently (last 3 weeks) completed a Clean Install of AMAHI 9 and the MariaDB Server still shows as stopped, even though MySQL seems to be running correctly.
Can it be advised if this behaviour will be affecting the WatchDog functionality for the MariaDB Server?
#10 Updated by austwhite over 5 years ago
Work around still corrects issue yes. You are right though, it does affect perceptions from anyone doing a clean install. Although the workaround is not difficult, it is not ideal on a new system. Especially if people are not as comfortable in the backend of the system.
#12 Updated by cpg over 4 years ago
i took a look and the permissions are:
-rw-rw---- 1 mysql mysql 5 Apr 26 14:14 /var/run/mariadb/mariadb.pid
which basically means we'd have to do some some pretty good privilege-escalation gymnastics to get this fixed more or less properly, and it may never really work well.
so, i am inclined to just not list mysql (and even apache) in the servers list, as they both would break the web interface, and also mysql would break hda-ctl and pretty much everything. i will do this unless there are any objections.
Also available in: Atom