Mysql starts without upstart/systemd

This commit is contained in:
Markos Vakondios 2017-03-12 21:28:49 +02:00
parent ef8f5ceb23
commit ed96013605
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,9 @@
#!/bin/bash
# Start MySQL
service mysql start
test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &"
# Give MySQL time to wake up
SECONDS_LEFT=120

View File

@ -7,7 +7,8 @@ umount /dev/shm
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm
# Start MySQL
service mysql start
test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &"
# Ensure we shut down mysql cleanly later:
trap close_mysql SIGTERM