Hello all!
I'm facing an issue with the mysql on the mr3020 (BARRIER BREAKER 14.07, r42625), it does not autostart after a power failure or a reboot.
I already have the script mysqld enabled on the inid.d:
/etc/init.d/mysqld enbale
Although it only starts when I do it manually:
/etc/init.d/mysqld start
Everything works as expected until I power cycle the router.
What can be causing this?
Is this an issue or just a config step I may missed?
If it's an issue, there is any workaround?
This is the mysqld script (/etc/init.d/mysqld)
#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2011 OpenWrt.org
START=95
STOP=10
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
SERVICE_STOP_TIME=9
error() {
echo "${initscript}:" "$@" 1>&2
}
start() {
local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]
if [ ! -d "$datadir" ]; then
error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
return 1
fi
if [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then
error "Error: I didn't detect a privileges table, you might need
return 1
fi
service_start /usr/bin/mysqld
}
stop() {
service_stop /usr/bin/mysqld
}
(Last edited by evilmonkey on 17 Aug 2016, 17:03)