VirtualBox

Ticket #15374: debian-start

File debian-start, 1.3 KB (added by sylvain Gplservice, 8 years ago)
Line 
1#!/bin/bash
2#
3# This script is executed by "/etc/init.d/mysql" on every (re)start.
4#
5# Changes to this file will be preserved when updating the Debian package.
6#
7
8source /usr/share/mysql/debian-start.inc.sh
9
10MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
11MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
12MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
13MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
14MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
15MYCHECK_PARAMS="--all-databases --fast --silent"
16MYCHECK_RCPT="root"
17
18# The following commands should be run when the server is up but in background
19# where they do not block the server start and in one shell instance so that
20# they run sequentially. They are supposed not to echo anything to stdout.
21# If you want to disable the check for crashed tables comment
22# "check_for_crashed_tables" out.
23# (There may be no output to stdout inside the background process!)
24echo "Checking for tables which need an upgrade, are corrupt or were "
25echo "not closed cleanly."
26(
27 upgrade_system_tables_if_necessary;
28 check_root_accounts;
29 check_for_crashed_tables;
30) >&2 &
31
32chgrp www /etc/mysql/debian.cnf
33chmod g+r /etc/mysql/debian.cnf
34
35exit 0

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy