mySQL not starting since kernel update - VirtualMin

Evening all,

So I've been an idiot and upgraded the kernel on my virtualmin server... everything works smoothly except for mysql :|

no matter what i try, i am unable to bring the service back to life.

sudo service mysql start
start: Job failed to start

uname -a
Linux hostname-removed 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I am running Ubuntu 12.04 and Virtualmin 4.02 - I have several sites set up which depend on mysql. Each site worked perfectly until the upgrade!

Any ideas?
Amarjot SinghAsked:
Who is Participating?
 
Kevin CrossConnect With a Mentor Chief Technology OfficerCommented:
No worries. I meant to say above that without knowing the scenario, I would specify the program explicitly but I stopped mid thought. Therefore, you can try just:
/usr/bin/mysqld_safe

Open in new window


That will eliminate the error about that option. It appears there is an issue with permissions.
For more information, see http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html
Try updating permissions on /tmp or use the "--tmpdir={new path}" option to specify a directory that MySQL can write to as the temporary directory.
http://dev.mysql.com/doc/refman/5.0/en/temporary-files.html
0
 
Kevin CrossChief Technology OfficerCommented:
Did you try:
/usr/bin/mysqld_safe --mysqld

Open in new window


One benefit is "logging runtime information to an error log file."
http://dev.mysql.com/doc/refman/5.0/en/mysqld-safe.html
0
 
Amarjot SinghAuthor Commented:
Hi mwvisa1

I forgot to mention that I am bit of a n00b and still have a lot to learn :)

/usr/bin/mysqld_safe --mysqld
130911 22:09:16 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
130911 22:09:16 mysqld_safe Logging to '/var/log/mysql/error.log'.
130911 22:09:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130911 22:09:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Open in new window


error.log shows:

130911 20:39:11 [Note] /usr/sbin/mysqld: Shutdown complete

130911 22:09:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130911 22:09:16 [Note] Plugin 'FEDERATED' is disabled.
130911 22:09:16 InnoDB: The InnoDB memory heap is disabled
130911 22:09:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130911 22:09:16 InnoDB: Compressed tables use zlib 1.2.3.4
/usr/sbin/mysqld: Can't create/write to file '/tmp/ibzUySNF' (Errcode: 13)
130911 22:09:16  InnoDB: Error: unable to create temporary file; errno: 13
130911 22:09:16 [ERROR] Plugin 'InnoDB' init function returned error.
130911 22:09:16 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130911 22:09:16 [ERROR] /usr/sbin/mysqld: unknown option '--mysqld'
130911 22:09:16 [ERROR] Aborting

130911 22:09:16 [Note] /usr/sbin/mysqld: Shutdown complete

130911 22:09:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Open in new window

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
arnoldCommented:
you have an error in your /etc/my.cnf

Remove all --log-error configuration options for --syslog to take effect.
kernel update is unlikely to have caused this issue.  my.cnf was changed, without mysql being restarted i.e. letting the change take effect in the future.

look at the mysql start parameters to make sure you are not specifying --syslog while the /etc/my.cnf or other parameters note --log-error.

look whether the start script /etc/init.d/mysqld has the log-error while you are also trying to start mysqld_safe with the --syslog option.
0
 
Kevin CrossChief Technology OfficerCommented:
Good catch, @arnold! The update likely was the first restart since the change.
0
 
Amarjot SinghAuthor Commented:
Hey Arnold - sorry, im a total n00b :)

Could you let me know what I need to execute or amend?

Thanks!
0
 
arnoldCommented:
look into /etc/my.cnf and see if you have log-syslog entry there.
log-error
then you need to also look at the start script and functions/parameters for mysql to make sure that you are not issuing conflicting directives.

The issue is as follows.
when mysqld tries to start it gets a --syslog (send errors to syslog) --log-errors filename (log errors to a filename)
It can only do one.

if you can post/attach your /etc/my.cnf to make sure it is not coming from there.
look in /etc/init.d/mysql as well
0
 
Amarjot SinghAuthor Commented:
Hey Arnold,

my.cnf

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc-messages-dir	= /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit	= 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

Open in new window


mysql

#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.

set -e

INITSCRIPT="$(basename "$0")"
JOB="${INITSCRIPT%.sh}"

if [ "$JOB" = "upstart-job" ]; then
    if [ -z "$1" ]; then
        echo "Usage: upstart-job JOB COMMAND" 1>&2
	exit 1
    fi

    JOB="$1"
    INITSCRIPT="$1"
    shift
else
    if [ -z "$1" ]; then
        echo "Usage: $0 COMMAND" 1>&2
	exit 1
    fi
fi

COMMAND="$1"
shift


if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
	ECHO=echo
else
	ECHO=:
fi

$ECHO "Rather than invoking init scripts through /etc/init.d, use the service(8)"
$ECHO "utility, e.g. service $INITSCRIPT $COMMAND"

# Only check if jobs are disabled if the currently _running_ version of
# Upstart (which may be older than the latest _installed_ version)
# supports such a query.
#
# This check is necessary to handle the scenario when upgrading from a
# release without the 'show-config' command (introduced in
# Upstart for Ubuntu version 0.9.7) since without this check, all
# installed packages with associated Upstart jobs would be considered
# disabled.
#
# Once Upstart can maintain state on re-exec, this change can be
# dropped (since the currently running version of Upstart will always
# match the latest installed version).

UPSTART_VERSION_RUNNING=$(initctl version|awk '{print $3}'|tr -d ')')

if dpkg --compare-versions "$UPSTART_VERSION_RUNNING" ge 0.9.7
then
    initctl show-config -e "$JOB"|grep -q '^  start on' || DISABLED=1
fi

case $COMMAND in
status)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    $COMMAND "$JOB"
    ;;
start|stop)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    if status "$JOB" 2>/dev/null | grep -q ' start/'; then
        RUNNING=1
    fi
    if [ -z "$RUNNING" ] && [ "$COMMAND" = "stop" ]; then
        exit 0
    elif [ -n "$RUNNING" ] && [ "$COMMAND" = "start" ]; then
        exit 0
    elif [ -n "$DISABLED" ] && [ "$COMMAND" = "start" ]; then
        exit 0
    fi
    $COMMAND "$JOB"
    ;;
restart)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the stop(8) and then start(8) utilities,"
    $ECHO "e.g. stop $JOB ; start $JOB. The restart(8) utility is also available."
    if status "$JOB" 2>/dev/null | grep -q ' start/'; then
        RUNNING=1
    fi
    if [ -n "$RUNNING" ] ; then
        stop "$JOB"
    fi
    # If the job is disabled and is not currently running, the job is
    # not restarted. However, if the job is disabled but has been forced into the
    # running state, we *do* stop and restart it since this is expected behaviour
    # for the admin who forced the start.
    if [ -n "$DISABLED" ] && [ -z "$RUNNING" ]; then
        exit 0
    fi
    start "$JOB"
    ;;
reload|force-reload)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the reload(8) utility, e.g. reload $JOB"
    reload "$JOB"
    ;;
*)
    $ECHO
    $ECHO "The script you are attempting to invoke has been converted to an Upstart" 1>&2
    $ECHO "job, but $COMMAND is not supported for Upstart jobs." 1>&2
    exit 1
esac

Open in new window


Both files as requested
0
 
arnoldCommented:
I do not have access to a ubuntu system right now, so the quickest way to get your mysql server started is to comment line 77 of my.cnf:
log_error

The other thing you may want to consider, you currently have it configured to listen only on localhost (line47 of my.cnf bind-address) which limits access to mysql to the system only.

If you want to access the mysql server from other systems on the LAM you need to comment that directive out and restart mysql.
Additional steps dealing with sfw ( ubuntu firewall interface).
0
 
Amarjot SinghAuthor Commented:
I commented out line 77 and tried to restart the service to no avail, so I bounced the box and it still didnt start up -

service mysql status
mysql stop/waiting

Open in new window


Also, with regards to other boxes, I'm happy with isolating sql to this box only.
0
 
arnoldCommented:
grep -i mysql /var/log/messages
is there any info there?

at this time what is there an error file in /var/lib/mysql/?
0
 
Amarjot SinghAuthor Commented:
the grep command didnt work for me so i looked inside the /var/log dirrectory and cat'd mysql.log and mysql.err - both were empty.

also i dont see a error file in /var/lib/mysql
0
 
arnoldCommented:
Do you have a messages/syslog file

ps -ef | grep -i mysql

service mysql stop

comment line 89,90 deal with binary logging that you no longer seem to have running.
Did you transition this system from slave to master of a replication?

Reenable the log_error line 77.
Wat do you have in /etc/mysql/conf.d?  See if you have a file there that tries to set syslog?
0
 
Amarjot SinghAuthor Commented:
 ps -ef | grep -i mysql
root      6450  6394  0 22:05 pts/0    00:00:00 grep --color=auto -i mysql

Open in new window


grep -i mysql /var/log/syslog
Sep 12 20:48:07 mtcweb001 kernel: [977751.708986] type=1400 audit(1379015287.718:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8707 comm="apparmor_parser"
Sep 12 20:48:07 mtcweb001 kernel: [977751.759375] init: mysql main process (8711) terminated with status 1
Sep 12 20:48:07 mtcweb001 kernel: [977751.759434] init: mysql main process ended, respawning
Sep 12 20:48:08 mtcweb001 kernel: [977752.759492] init: mysql post-start process (8712) terminated with status 1
Sep 12 20:48:08 mtcweb001 kernel: [977752.778580] type=1400 audit(1379015288.786:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8735 comm="apparmor_parser"
Sep 12 20:48:08 mtcweb001 kernel: [977752.829382] init: mysql main process (8739) terminated with status 1
Sep 12 20:48:08 mtcweb001 kernel: [977752.829467] init: mysql main process ended, respawning
Sep 12 20:48:09 mtcweb001 kernel: [977753.828191] init: mysql post-start process (8740) terminated with status 1
Sep 12 20:48:09 mtcweb001 kernel: [977753.849473] type=1400 audit(1379015289.857:23): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8763 comm="apparmor_parser"
Sep 12 20:48:09 mtcweb001 kernel: [977753.905021] init: mysql main process (8767) terminated with status 1
Sep 12 20:48:09 mtcweb001 kernel: [977753.905077] init: mysql respawning too fast, stopped
Sep 12 20:50:59 mtcweb001 kernel: [977923.035704] type=1400 audit(1379015459.024:13): apparmor="STATUS" operation="profile_load" name="/usr/sbin/mysqld" pid=953 comm="apparmor_parser"
Sep 12 20:51:00 mtcweb001 kernel: [977924.623310] type=1400 audit(1379015460.612:19): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1026 comm="apparmor_parser"
Sep 12 20:51:05 mtcweb001 kernel: [977929.498249] init: mysql main process (1030) terminated with status 1
Sep 12 20:51:05 mtcweb001 kernel: [977929.498306] init: mysql main process ended, respawning
Sep 12 20:51:06 mtcweb001 kernel: [977930.437181] init: mysql post-start process (1032) terminated with status 1
Sep 12 20:51:06 mtcweb001 kernel: [977930.458488] type=1400 audit(1379015466.447:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1242 comm="apparmor_parser"
Sep 12 20:51:06 mtcweb001 kernel: [977930.507946] init: mysql main process (1246) terminated with status 1
Sep 12 20:51:06 mtcweb001 kernel: [977930.508000] init: mysql main process ended, respawning
Sep 12 20:51:07 mtcweb001 kernel: [977931.511377] init: mysql post-start process (1247) terminated with status 1
Sep 12 20:51:07 mtcweb001 kernel: [977931.532272] type=1400 audit(1379015467.519:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1287 comm="apparmor_parser"
Sep 12 20:51:07 mtcweb001 kernel: [977931.583652] init: mysql main process (1291) terminated with status 1
Sep 12 20:51:07 mtcweb001 kernel: [977931.583723] init: mysql respawning too fast, stopped
Sep 12 20:53:53 mtcweb001 kernel: [978097.688889] type=1400 audit(1379015633.652:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2280 comm="apparmor_parser"
Sep 12 20:53:53 mtcweb001 kernel: [978097.738975] init: mysql main process (2284) terminated with status 1
Sep 12 20:53:53 mtcweb001 kernel: [978097.739045] init: mysql main process ended, respawning
Sep 12 20:53:54 mtcweb001 kernel: [978098.748114] init: mysql post-start process (2285) terminated with status 1
Sep 12 20:53:54 mtcweb001 kernel: [978098.767137] type=1400 audit(1379015634.728:23): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2314 comm="apparmor_parser"
Sep 12 20:53:54 mtcweb001 kernel: [978098.818450] init: mysql main process (2318) terminated with status 1
Sep 12 20:53:54 mtcweb001 kernel: [978098.818507] init: mysql main process ended, respawning
Sep 12 20:53:55 mtcweb001 kernel: [978099.817846] init: mysql post-start process (2319) terminated with status 1
Sep 12 20:53:55 mtcweb001 kernel: [978099.837249] type=1400 audit(1379015635.800:24): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2342 comm="apparmor_parser"
Sep 12 20:53:55 mtcweb001 kernel: [978099.884365] init: mysql main process (2346) terminated with status 1
Sep 12 20:53:55 mtcweb001 kernel: [978099.884430] init: mysql respawning too fast, stopped
Sep 12 20:57:27 mtcweb001 kernel: [978311.560296] type=1400 audit(1379015847.499:25): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2861 comm="apparmor_parser"
Sep 12 20:57:27 mtcweb001 kernel: [978311.717120] init: mysql main process (2865) terminated with status 1
Sep 12 20:57:27 mtcweb001 kernel: [978311.717178] init: mysql main process ended, respawning
Sep 12 20:57:28 mtcweb001 kernel: [978312.612552] init: mysql post-start process (2866) terminated with status 1
Sep 12 20:57:28 mtcweb001 kernel: [978312.632940] type=1400 audit(1379015848.571:26): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2896 comm="apparmor_parser"
Sep 12 20:57:28 mtcweb001 kernel: [978312.680481] init: mysql main process (2900) terminated with status 1
Sep 12 20:57:28 mtcweb001 kernel: [978312.680589] init: mysql main process ended, respawning
Sep 12 20:57:29 mtcweb001 kernel: [978313.685133] init: mysql post-start process (2901) terminated with status 1
Sep 12 20:57:29 mtcweb001 kernel: [978313.704668] type=1400 audit(1379015849.643:27): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2930 comm="apparmor_parser"
Sep 12 20:57:29 mtcweb001 kernel: [978313.761914] init: mysql main process (2934) terminated with status 1
Sep 12 20:57:29 mtcweb001 kernel: [978313.761971] init: mysql respawning too fast, stopped
Sep 12 20:59:51 mtcweb001 kernel: [978455.908352] type=1400 audit(1379015991.823:28): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3027 comm="apparmor_parser"
Sep 12 20:59:51 mtcweb001 kernel: [978455.958808] init: mysql main process (3031) terminated with status 1
Sep 12 20:59:51 mtcweb001 kernel: [978455.958864] init: mysql main process ended, respawning
Sep 12 20:59:52 mtcweb001 kernel: [978456.963349] init: mysql post-start process (3032) terminated with status 1
Sep 12 20:59:52 mtcweb001 kernel: [978456.982963] type=1400 audit(1379015992.899:29): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3063 comm="apparmor_parser"
Sep 12 20:59:52 mtcweb001 kernel: [978457.033235] init: mysql main process (3067) terminated with status 1
Sep 12 20:59:52 mtcweb001 kernel: [978457.033291] init: mysql main process ended, respawning
Sep 12 20:59:53 mtcweb001 kernel: [978458.034843] init: mysql post-start process (3068) terminated with status 1
Sep 12 20:59:53 mtcweb001 kernel: [978458.054455] type=1400 audit(1379015993.971:30): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3100 comm="apparmor_parser"
Sep 12 20:59:54 mtcweb001 kernel: [978458.105610] init: mysql main process (3104) terminated with status 1
Sep 12 20:59:54 mtcweb001 kernel: [978458.105678] init: mysql respawning too fast, stopped
root@mtcweb001:~# clear
root@mtcweb001:~# grep -i mysql /var/log/syslog
Sep 12 20:48:07 mtcweb001 kernel: [977751.708986] type=1400 audit(1379015287.718:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8707 comm="apparmor_parser"
Sep 12 20:48:07 mtcweb001 kernel: [977751.759375] init: mysql main process (8711) terminated with status 1
Sep 12 20:48:07 mtcweb001 kernel: [977751.759434] init: mysql main process ended, respawning
Sep 12 20:48:08 mtcweb001 kernel: [977752.759492] init: mysql post-start process (8712) terminated with status 1
Sep 12 20:48:08 mtcweb001 kernel: [977752.778580] type=1400 audit(1379015288.786:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8735 comm="apparmor_parser"
Sep 12 20:48:08 mtcweb001 kernel: [977752.829382] init: mysql main process (8739) terminated with status 1
Sep 12 20:48:08 mtcweb001 kernel: [977752.829467] init: mysql main process ended, respawning
Sep 12 20:48:09 mtcweb001 kernel: [977753.828191] init: mysql post-start process (8740) terminated with status 1
Sep 12 20:48:09 mtcweb001 kernel: [977753.849473] type=1400 audit(1379015289.857:23): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=8763 comm="apparmor_parser"
Sep 12 20:48:09 mtcweb001 kernel: [977753.905021] init: mysql main process (8767) terminated with status 1
Sep 12 20:48:09 mtcweb001 kernel: [977753.905077] init: mysql respawning too fast, stopped
Sep 12 20:50:59 mtcweb001 kernel: [977923.035704] type=1400 audit(1379015459.024:13): apparmor="STATUS" operation="profile_load" name="/usr/sbin/mysqld" pid=953 comm="apparmor_parser"
Sep 12 20:51:00 mtcweb001 kernel: [977924.623310] type=1400 audit(1379015460.612:19): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1026 comm="apparmor_parser"
Sep 12 20:51:05 mtcweb001 kernel: [977929.498249] init: mysql main process (1030) terminated with status 1
Sep 12 20:51:05 mtcweb001 kernel: [977929.498306] init: mysql main process ended, respawning
Sep 12 20:51:06 mtcweb001 kernel: [977930.437181] init: mysql post-start process (1032) terminated with status 1
Sep 12 20:51:06 mtcweb001 kernel: [977930.458488] type=1400 audit(1379015466.447:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1242 comm="apparmor_parser"
Sep 12 20:51:06 mtcweb001 kernel: [977930.507946] init: mysql main process (1246) terminated with status 1
Sep 12 20:51:06 mtcweb001 kernel: [977930.508000] init: mysql main process ended, respawning
Sep 12 20:51:07 mtcweb001 kernel: [977931.511377] init: mysql post-start process (1247) terminated with status 1
Sep 12 20:51:07 mtcweb001 kernel: [977931.532272] type=1400 audit(1379015467.519:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1287 comm="apparmor_parser"
Sep 12 20:51:07 mtcweb001 kernel: [977931.583652] init: mysql main process (1291) terminated with status 1
Sep 12 20:51:07 mtcweb001 kernel: [977931.583723] init: mysql respawning too fast, stopped
Sep 12 20:53:53 mtcweb001 kernel: [978097.688889] type=1400 audit(1379015633.652:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2280 comm="apparmor_parser"
Sep 12 20:53:53 mtcweb001 kernel: [978097.738975] init: mysql main process (2284) terminated with status 1
Sep 12 20:53:53 mtcweb001 kernel: [978097.739045] init: mysql main process ended, respawning
Sep 12 20:53:54 mtcweb001 kernel: [978098.748114] init: mysql post-start process (2285) terminated with status 1
Sep 12 20:53:54 mtcweb001 kernel: [978098.767137] type=1400 audit(1379015634.728:23): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2314 comm="apparmor_parser"
Sep 12 20:53:54 mtcweb001 kernel: [978098.818450] init: mysql main process (2318) terminated with status 1
Sep 12 20:53:54 mtcweb001 kernel: [978098.818507] init: mysql main process ended, respawning
Sep 12 20:53:55 mtcweb001 kernel: [978099.817846] init: mysql post-start process (2319) terminated with status 1
Sep 12 20:53:55 mtcweb001 kernel: [978099.837249] type=1400 audit(1379015635.800:24): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2342 comm="apparmor_parser"
Sep 12 20:53:55 mtcweb001 kernel: [978099.884365] init: mysql main process (2346) terminated with status 1
Sep 12 20:53:55 mtcweb001 kernel: [978099.884430] init: mysql respawning too fast, stopped
Sep 12 20:57:27 mtcweb001 kernel: [978311.560296] type=1400 audit(1379015847.499:25): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2861 comm="apparmor_parser"
Sep 12 20:57:27 mtcweb001 kernel: [978311.717120] init: mysql main process (2865) terminated with status 1
Sep 12 20:57:27 mtcweb001 kernel: [978311.717178] init: mysql main process ended, respawning
Sep 12 20:57:28 mtcweb001 kernel: [978312.612552] init: mysql post-start process (2866) terminated with status 1
Sep 12 20:57:28 mtcweb001 kernel: [978312.632940] type=1400 audit(1379015848.571:26): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2896 comm="apparmor_parser"
Sep 12 20:57:28 mtcweb001 kernel: [978312.680481] init: mysql main process (2900) terminated with status 1
Sep 12 20:57:28 mtcweb001 kernel: [978312.680589] init: mysql main process ended, respawning
Sep 12 20:57:29 mtcweb001 kernel: [978313.685133] init: mysql post-start process (2901) terminated with status 1
Sep 12 20:57:29 mtcweb001 kernel: [978313.704668] type=1400 audit(1379015849.643:27): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2930 comm="apparmor_parser"
Sep 12 20:57:29 mtcweb001 kernel: [978313.761914] init: mysql main process (2934) terminated with status 1
Sep 12 20:57:29 mtcweb001 kernel: [978313.761971] init: mysql respawning too fast, stopped
Sep 12 20:59:51 mtcweb001 kernel: [978455.908352] type=1400 audit(1379015991.823:28): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3027 comm="apparmor_parser"
Sep 12 20:59:51 mtcweb001 kernel: [978455.958808] init: mysql main process (3031) terminated with status 1
Sep 12 20:59:51 mtcweb001 kernel: [978455.958864] init: mysql main process ended, respawning
Sep 12 20:59:52 mtcweb001 kernel: [978456.963349] init: mysql post-start process (3032) terminated with status 1
Sep 12 20:59:52 mtcweb001 kernel: [978456.982963] type=1400 audit(1379015992.899:29): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3063 comm="apparmor_parser"
Sep 12 20:59:52 mtcweb001 kernel: [978457.033235] init: mysql main process (3067) terminated with status 1
Sep 12 20:59:52 mtcweb001 kernel: [978457.033291] init: mysql main process ended, respawning
Sep 12 20:59:53 mtcweb001 kernel: [978458.034843] init: mysql post-start process (3068) terminated with status 1
Sep 12 20:59:53 mtcweb001 kernel: [978458.054455] type=1400 audit(1379015993.971:30): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3100 comm="apparmor_parser"
Sep 12 20:59:54 mtcweb001 kernel: [978458.105610] init: mysql main process (3104) terminated with status 1
Sep 12 20:59:54 mtcweb001 kernel: [978458.105678] init: mysql respawning too fast, stopped

Open in new window


service mysql stop
stop: Unknown instance:
 service mysql start
start: Job failed to start

Open in new window



I commented 89 and 90 and tried but nothing. left 89 and 90 commented and uncommented 77, still nothing. I've uncommented all three lines now.

in answer to transition from slave to master... no. no changes were made. this only broke once updates were applied.
0
 
arnoldCommented:
You have something else trying to start mysql.
0
 
Amarjot SinghAuthor Commented:
I have Virtualmin installed - i'm guessing thats trying to start it up also..?
0
 
arnoldCommented:
It looks like your are trying to start mysql through init. Mysql goes into background which is why init reports the respawn too fast error.


Look whether the configuration of virtualmin deals/handles mysql startup.

Is the mysql.log now once again reports the conflict with --syslog and log-error directives?
0
 
Amarjot SinghAuthor Commented:
Sorry, I had an operational disaster at work which has kept me extremely busy!

Arnold, I havent been find anything within virtualmin (pretty sure there is something there just dont know how to find it).

Not sure what you meant in your last sentence.
0
 
arnoldCommented:
Since you reverted to my.cnf log_error, does the log file again reflects the same error as you posted where it said that --syslog and --log_error should not be defined at the same time?

I have not dealt with virtualmin.
The suggestion I can make is to try and trackdown what you currently have running.
ps -ef | grep -i mysqld
and you should see it keep restarting.  The error saying <mysql> respawning to quickly suggests that mysql is being started from/bin init on some system those are entries within /etc/inittab

on ubuntu  inittab is not in use, I think telinit and other commands are setup.  Look within virtualmin.

Are you using a graphical desktop?  look through the service/system utilities to see what/where mysqld is being started from.
0
 
Amarjot SinghAuthor Commented:
using ubuntu server, with no desktop.

is there anyway of pulling up system utilities from cmd line?
0
 
arnoldCommented:
you can redirect X ssh -X username@ubuntuserver
then you can run the X command which will be sent back through the SSH window to your X server.
startx will start the GUI on the desktop provided the packages are installed.
You may have it accessible as a web browser.
There are too many ways one can setup their system and accordingly the options to manage it are as diverse.

ps -ef | grep mysql
yours seems to be starting from an INIT based event rather than start once.

inittab does not exist in Ubuntu, but you may have upstart.

gpkg -i

you have to determine what and how your setup is working and work around it.  You may have the configuration in a different location.
0
 
Amarjot SinghAuthor Commented:
im currently installing xinit so i can startx. once i get the gui set up ill update on my findings.
0
 
Amarjot SinghAuthor Commented:
Massive facepalm here.

I have been looking at /var/tmp rather than /tmp.

I change the perms from 755 to 1777 on /tmp and now MySQL starts!!

Thanks Arnold for all your help
0
 
Kevin CrossChief Technology OfficerCommented:
I am glad you figured it out.

Best regards and happy coding,

Kevin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.