Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysqld fails to start: Failure to open log file [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ctd.mh3
n00b
n00b


Joined: 14 May 2008
Posts: 35
Location: Minnesota, USA

PostPosted: Wed May 14, 2008 11:43 am    Post subject: mysqld fails to start: Failure to open log file [solved] Reply with quote

Hey there,

I have had a server setup for about a half a year using gentoo, and last night I noticed some problems starting and stopping my squeezecenter. In the end, I decided to reboot to see if everything started up correctly. During the boot-up, various processes complained that my root partition was full. Using DF, i did verify that root was at 100%.

Using information in https://forums.gentoo.org/viewtopic-t-30547.html, df now shows root is only ~50% full. So I thought I was ok. rebooted (bad habit from windows days).

Now mysqld will not start on boot-up. A manual start produces the following:
Code:

mythserver michael # /etc/init.d/mysql start
 * Starting mysql ...
 * Starting mysql (/etc/mysql/my.cnf)
 * MySQL NOT started (0)                                                                                                                                [ !! ]


my /var/log/mysql/mysqld.err contains the following:
Code:

080513 21:19:05 [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.
080513 21:19:05  InnoDB: Started; log sequence number 0 19865423
/usr/sbin/mysqld: File '' not found (Errcode: 2)
080513 21:19:05 [ERROR] Failed to open log (file '', errno 2)
080513 21:19:05 [ERROR] Could not open log file
080513 21:19:05 [ERROR] Can't init tc log
080513 21:19:05 [ERROR] Aborting

080513 21:19:05  InnoDB: Starting shutdown...
080513 21:19:06  InnoDB: Shutdown completed; log sequence number 0 19865423
080513 21:19:06 [Note] /usr/sbin/mysqld: Shutdown complete


My /etc/mysql/my.cnf is:
Code:

# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.1,v 1.3 2006/05/05 19:51:40 chtekk Exp $

# The following options will be passed to all MySQL clients
[client]
#password                                       = your_password
port                                            = 3306
socket                                          = /var/run/mysqld/mysqld.sock

[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[myisamchk]
character-sets-dir=/usr/share/mysql/charsets

[myisampack]
character-sets-dir=/usr/share/mysql/charsets

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log                                 = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
[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
# Seeberger
expire_logs_days                        = 7

# 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 = 5M
# 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
set-variable = 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

[mysqldump]
quick
max_allowed_packet                      = 16M

[mysql]
# uncomment the next directive if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer                              = 20M
sort_buffer_size                        = 20M
read_buffer                             = 2M
write_buffer                            = 2M

[myisamchk]
key_buffer                              = 20M
sort_buffer_size                        = 20M
read_buffer                             = 2M
write_buffer                            = 2M

[mysqlhotcopy]
interactive-timeout


I have seen various posts talking about failure to open a log file, but the mysqld error output lists a specific file (normally a bin file) and not ''.

I have done a emerge again with no change:
Code:
emerge mysql


I have mysql-5.0-54 installed.

Any help would be greatly appreciated.

Thanks in advance.
Mike


Last edited by ctd.mh3 on Fri May 30, 2008 5:47 pm; edited 3 times in total
Back to top
View user's profile Send private message
ctd.mh3
n00b
n00b


Joined: 14 May 2008
Posts: 35
Location: Minnesota, USA

PostPosted: Wed May 14, 2008 4:00 pm    Post subject: Sort of fixed Reply with quote

Well, going on the advice of a friend I decided to look at my /etc/mysql/my.cnf file a little closer.

I had not personally modified this file in months, so I had assumed it was correct.

To attempt to find a pristine my.cnf file, I did the following:
Code:

locate my.cnf
/etc/mysql/my.cnf
/usr/portage/dev-db/mysql-community/files/my.cnf-4.1
/usr/portage/dev-db/mysql/files/my.cnf
/usr/portage/dev-db/mysql/files/my.cnf-4.0
/usr/portage/dev-db/mysql/files/my.cnf-4.1
/var/cache/slimserver/my.cnf


I assumed the /usr/portage/dev-db/mysql/files/my.cnf file must be a "good" file. So I renamed my /etc/mysql/my.cnf and copied the /usr/portage/dev-db/mysql/files/my.cnf to /etc/mysql/my.cnf.

After that change, mysqld could start correctly.

The /usr/portage/dev-db/mysql/files/my.cnf file contains the following:

Code:

# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf,v 1.4 2004/07/18 02:47:43 dragonheart Exp $
#
# This file can be simultaneously placed in three places:
# 1. /etc/mysql/my.cnf to set global options.
# 2. /var/lib/mysql/my.cnf to set server-specific options.
# 3. ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!

[client]
#password       = my_password
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[safe_mysqld]
err-log         = /var/log/mysql/mysql.err

[mysqld]
#skip-networking
skip-innodb
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
log             = /var/log/mysql/mysql.log
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-locking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = thread_stack=128K

[mysqldump]
quick
set-variable    = max_allowed_packet=1M

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

[isamchk]
set-variable    = key_buffer=16M



There a significant number of differences between this portage file and my /etc/mysql/my.cnf file. Now my only concern and work to do is to look into these differences and understand if I need to merge back any of the options. Any idea why these files would be so different?

Mike
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum