Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254133 - MySQL NOT started (0)
Summary: MySQL NOT started (0)
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 18:22 UTC by Imre Péntek
Modified: 2010-12-15 03:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo.txt,3.82 KB, text/plain)
2009-01-07 18:22 UTC, Imre Péntek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Imre Péntek 2009-01-07 18:22:01 UTC
I receive the following error at boot:
 * Starting mysql ...
 * Starting mysql (/etc/mysql/my.cnf)
 * MySQL NOT started (0)                                   [ !! ]

now it happened when rebooting after I modified /etc/conf.d/net.

Reproducible: Sometimes
Comment 1 Imre Péntek 2009-01-07 18:22:55 UTC
Created attachment 177702 [details]
emerge --info
Comment 2 Dawid Węgliński (RETIRED) gentoo-dev 2009-01-07 18:25:51 UTC
Please show me snip of your my.cnf where you have defined [mysqld] and tail of mysqld.err
Comment 3 Imre Péntek 2009-01-07 18:30:46 UTC
my system was halted properly, however:
boborjan ~ # /etc/init.d/mysql start
 * Starting mysql ...
 * "/var/run/mysqld/mysqld.pid" is still present and the process is running.
 * Please stop it "kill 8141" maybe ?                                     [ !! ]
boborjan ~ # ps uxa|grep 8141
root     10422  0.0  0.1   6600   752 pts/0    S+   19:28   0:00 grep --colour=auto 8141
boborjan ~ # /etc/init.d/mysql stop
 * WARNING:  mysql has not yet been started.
boborjan ~ # rm /var/run/mysqld/mysqld.pid
rm: "/var/run/mysqld/mysqld.pid" cannot be deleted: No such file or directory
boborjan ~ # /etc/init.d/mysql start
 * Starting mysql ...
 * Starting mysql (/etc/mysql/my.cnf)                                     [ ok ]
boborjan ~ # 
Comment 4 Imre Péntek 2009-01-07 18:33:05 UTC
[mysqld]
character-set-server            = utf8
default-character-set           = utf8
user                                            = mysql
port                                            = 3306
socket                                          = /var/run/mysqld/mysqld.sock
pid-file                                        = /var/run/mysqld/mysqld.pid
log-error                                       = /var/log/mysql/mysqld.err
basedir                                         = /usr
datadir                                         = /var/lib/mysql
skip-locking
key_buffer                                      = 16M
max_allowed_packet                      = 1M
table_cache                             = 64
sort_buffer_size                        = 512K
net_buffer_length                       = 8K
read_buffer_size                        = 256K
read_rnd_buffer_size            = 512K
myisam_sort_buffer_size         = 8M
language                                        = /usr/share/mysql/english

I thin I haven't modified this config file.

boborjan ~ # wc /var/log/mysql/mysql.err 
0 0 0 /var/log/mysql/mysql.err
Comment 5 Dawid Węgliński (RETIRED) gentoo-dev 2009-01-07 18:45:09 UTC
I'm sure you should edit this file then to setup mysql properly. By the way it is possible your mysql has started but reported failure. This is common.

Abyway, assigning to mysql bugs, they will know how to resolve this.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-11 11:42:37 UTC
Did you look at /var/log/mysql/mysqld.err (notice the extra d)? You gave us wc of mysql.err instead. You also did not include all of the relevant my.cnf file if you changed it. 
You need to start at the [mysqld] block and continue to the start of the next block, which is [mysqldump] in the default configuration.

Please reopen with requested information.
Comment 7 martin holzer 2009-12-28 13:50:12 UTC
i have/had the same, after a "dirty" shutdown (hard-reset)
Comment 8 Stefano Priore 2010-12-14 23:23:20 UTC
I have installed mysql on 4 systems (2 x86 and 2 amd64) and I experience exactly the same problem reported in comment #3, but ONLY on the x86 systems!

Here is the [mysqld] block and the tail of /var/log/mysql/mysqld.err of one of the two x86's. emerge --info follows.

[mysqld]
character-set-server            = utf8
user                                            = mysql
port                                            = 3306
socket                                          = /var/run/mysqld/mysqld.sock
pid-file                                        = /var/run/mysqld/mysqld.pid
log-error                                       = /var/log/mysql/mysqld.err
basedir                                         = /usr
datadir                                         = /var/lib/mysql
skip-external-locking
key_buffer                                      = 16M
max_allowed_packet                      = 16M
table_cache                             = 64
sort_buffer_size                        = 512K
net_buffer_length                       = 8K
read_buffer_size                        = 256K
read_rnd_buffer_size            = 512K
myisam_sort_buffer_size         = 8M
language                                        = /usr/share/mysql/english

# security:
# using "localhost" in connects uses sockets by default
# skip-networking
# bind-address                          = 127.0.0.1

log-bin
server-id                                       = 1

# point the following paths to different dedicated disks
tmpdir                                          = /tmp/
#log-update                             = /path-to-dedicated-directory/hostname

# you need the debug USE flag enabled to use the following directives,
# if needed, uncomment them, start the server and issue 
# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
# this will show you *exactly* what's happening in your server ;)

#log                                            = /tmp/mysqld.sql
#gdb
#debug                                          = d:t:i:o,/tmp/mysqld.trace
#one-thread

# uncomment the following directives if you are using BDB tables
#bdb_cache_size                         = 4M
#bdb_max_lock                           = 10000

# the following is the InnoDB configuration
# if you wish to disable innodb instead
# uncomment just the next line
#skip-innodb
#
# the rest of the innodb config follows:
# don't eat too much memory, we're trying to be safe on 64Mb boxes
# you might want to bump this up a bit on boxes with more RAM
innodb_buffer_pool_size = 16M
# this is the default, increase it if you have lots of tables
innodb_additional_mem_pool_size = 2M
#
# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
# and upstream wants things to be under /var/lib/mysql/, so that's the route
# we have to take for the moment
#innodb_data_home_dir           = /var/lib/mysql/
#innodb_log_arch_dir            = /var/lib/mysql/
#innodb_log_group_home_dir      = /var/lib/mysql/
# you may wish to change this size to be more suitable for your system
# the max is there to avoid run-away growth on your machine
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
# we keep this at around 25% of of innodb_buffer_pool_size
# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
innodb_log_file_size = 8M
# this is the default, increase it if you have very large transactions going on
innodb_log_buffer_size = 8M
# this is the default and won't hurt you
# you shouldn't need to tweak it
innodb_log_files_in_group=2
# see the innodb config docs, the other options are not always safe
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_file_per_table

101206 16:58:55 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
101206 16:59:04  InnoDB: Started; log sequence number 0 32864680
101206 16:59:04 [Note] Recovering after a crash using mysqld-bin
101206 16:59:04 [Note] Starting crash recovery...
101206 16:59:04 [Note] Crash recovery finished.
101206 16:59:08 [Note] Event Scheduler: Loaded 0 events
101206 16:59:08 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.51-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-5.1.51
101209 11:28:43 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
101209 11:28:54  InnoDB: Started; log sequence number 0 32864680
101209 11:28:54 [Note] Recovering after a crash using mysqld-bin
101209 11:28:54 [Note] Starting crash recovery...
101209 11:28:54 [Note] Crash recovery finished.
101209 11:28:58 [Note] Event Scheduler: Loaded 0 events
101209 11:28:58 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.51-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-5.1.51

Comment 9 Stefano Priore 2010-12-14 23:23:30 UTC
# emerge --info
Portage 2.1.9.24 (default/linux/x86/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.35-gentoo-r12-Toy i686)
=================================================================
System uname: Linux-2.6.35-gentoo-r12-Toy-i686-Intel-R-_Pentium-R-_4_CPU_1400MHz-with-gentoo-1.12.14
Timestamp of tree: Tue, 14 Dec 2010 21:00:22 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acpi apache2 bash-completion berkdb bidi blas bluetooth branding bzip2 cdparanoia cdr cjk clamav cli cracklib crypt css cups curl curlwrappers cxx dbus dts dvd dvdr encode exif expat fam fftw flac fortran ftp gdbm gif gmp gnutls gpm hal iconv icu idea idn innodb jbig jpeg jpeg2k lcms libnotify lm_sensors lzma lzo maildir mhash mime mmx mng modules mp4 mudflap ncurses network-cron nls nptl nptlonly offensive pam pango pcre pdf perl png ppds python readline recode samba sasl session slang spell sse sse2 ssl startup-notification sysfs szip tcpd threads tidy tiff truetype unicode usb vim-syntax wifi x264 x86 xattr xcb xml xulrunner xvid zlib" ALSA_CARDS="ens1371 pcsp seq-dummy" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog contextswitch cpu cpufreq curl curl_xml disk entropy filecount hddtemp logfile network nfs ntpd processes sensors serial table tail tcpconns uptime users vmem wireless match_empty_counter match_hashed match_regex match_timediff match_value target_notification target_replace target_scale target_set" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek net" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-15 03:11:33 UTC
increase your startup_timeout in the conf.d file, or try the new init scripts from the mysql overlay.