View previous topic :: View next topic |
Author |
Message |
rutski89 Guru
Joined: 14 Mar 2005 Posts: 468 Location: United States N.Y.
|
Posted: Thu Jul 21, 2005 4:31 pm Post subject: MySQL Start errors |
|
|
I just emerged mysql 4.0.25-r2, ran ebuild /var/db/pkg/dev-db/mysql-4.0.25-r2/mysql-4.0.25-r2.ebuild config, and /usr/bin/mysql_install_db.
Upon trying /etc/init.d/mysql start I get this: Code: |
localhost ~ # /etc/init.d/mysql start
* Starting mysqld (/etc/mysql/my.cnf) ... [ !! ]
localhost ~ # |
Here is my /etc/mysql/my.cnf file: Code: |
localhost ~ # cat /etc/mysql/my.cnf
# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.24-r1,v 1.1 2005/03/13 05:54:00 robbat2 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 64M RAM!
[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
[safe_mysqld]
err-log = /var/log/mysql/mysql.err
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
log-error = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
# file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
# the master logs.
# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable = binlog-do-db=non_existant
# set-variable = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id = 207
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
# keep secure by default!
bind-address = 127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking
#
# 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
set-variable = innodb_buffer_pool_size=32M
# this is the default, increase if you have lots of tables
set-variable = innodb_additional_mem_pool_size=1M
#
# 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)
set-variable = innodb_log_file_size=8M
# this is the default, increase if you have very large transactions.
set-variable = innodb_log_buffer_size=1M
# 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
[mysqldump]localhost ~ # ps -A | grep sql
21551 ? 00:00:00 mysqld_safe
21610 ? 00:00:00 mysqld
localhost ~ #
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
localhost ~ # |
The odd thing about this is that mysql does acutally start (despite the failed [!!] symbol in the runscript output):
Code: |
localhost ~ # ps -A | grep sql
21551 ? 00:00:00 mysqld_safe
21610 ? 00:00:00 mysqld
localhost ~ #
|
I'd really like to find out where that error is comming from though. _________________ << ^ | ~ >> |
|
Back to top |
|
|
Jerle n00b
Joined: 27 Feb 2003 Posts: 16
|
Posted: Thu Jul 21, 2005 5:36 pm Post subject: |
|
|
Were there any error messages in the log? And does the server actually work, even though it shows that message, or is it a process that does nothing? |
|
Back to top |
|
|
stickboy2642 Tux's lil' helper
Joined: 21 Jan 2004 Posts: 129 Location: MT, USA
|
Posted: Thu Jul 21, 2005 6:25 pm Post subject: |
|
|
I am betting it's something with innodb, but looking in the log file would really help. The log should be located in /var/log/mysql/mysqld.log. This file should contain information as to why the database is not starting up. Take a look and see if it says anything important, and post here if you are still not able to figure it out. _________________ <?PHP
if ($desireToSolveProblem > 0){
solve($problem);
}else{
drink($beer);
} ?> |
|
Back to top |
|
|
rutski89 Guru
Joined: 14 Mar 2005 Posts: 468 Location: United States N.Y.
|
Posted: Thu Jul 21, 2005 6:41 pm Post subject: |
|
|
These logs are produced by the invocation of the runscript, they don't look too much like errors though: Code: | localhost mysql # ls
mysql.err mysqld.err
localhost mysql # cat mysql.err
050721 14:26:04 mysqld started
localhost mysql # cat mysqld.err
050721 14:26:04 InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.25' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-4.0.25-r2
localhost mysql #
|
_________________ << ^ | ~ >> |
|
Back to top |
|
|
rutski89 Guru
Joined: 14 Mar 2005 Posts: 468 Location: United States N.Y.
|
Posted: Thu Jul 21, 2005 7:56 pm Post subject: |
|
|
Ok... now its a real problem: Code: | localhost mysql # /etc/init.d/mysql start
* Starting mysqld (/etc/mysql/my.cnf) ... [ !! ]
localhost mysql # /etc/init.d/mysql stop
* ERROR: "mysql" has not yet been started.
localhost mysql #
|
_________________ << ^ | ~ >> |
|
Back to top |
|
|
stickboy2642 Tux's lil' helper
Joined: 21 Jan 2004 Posts: 129 Location: MT, USA
|
Posted: Thu Jul 21, 2005 9:14 pm Post subject: |
|
|
Is there anything of relevance in mysqld.err (the other file in that directory)? That might hold more clues as to why it is bombing out. _________________ <?PHP
if ($desireToSolveProblem > 0){
solve($problem);
}else{
drink($beer);
} ?> |
|
Back to top |
|
|
BastianBalthazarBux Retired Dev
Joined: 10 Dec 2004 Posts: 78
|
|
Back to top |
|
|
richard.scott Veteran
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Wed Aug 24, 2005 12:05 pm Post subject: |
|
|
I had the same sort of error in my /var/log/mysql/mysqld.err file:
Code: | InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 8388608 bytes!
050824 10:10:53 Can't init databases
050824 10:10:53 Aborting
050824 10:10:53 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
050824 10:10:53 /usr/sbin/mysqld: Shutdown Complete |
I found that removing the /var/lib/mysql/ib* files and restarting MySQL helped me.
This had happened when I rebuilt mysql and the /etc/mysql/my.cnf file had commented out the skip-innodb settings for some reason.
very odd, but all seems ok now. |
|
Back to top |
|
|
newtonian Guru
Joined: 19 Jan 2005 Posts: 465 Location: Hokkaido Japan
|
Posted: Wed Apr 12, 2006 5:16 pm Post subject: |
|
|
richard.scott wrote: | I had the same sort of error in my /var/log/mysql/mysqld.err file:
Code: | InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 8388608 bytes!
050824 10:10:53 Can't init databases
050824 10:10:53 Aborting
050824 10:10:53 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
050824 10:10:53 /usr/sbin/mysqld: Shutdown Complete |
I found that removing the /var/lib/mysql/ib* files and restarting MySQL helped me.
This had happened when I rebuilt mysql and the /etc/mysql/my.cnf file had commented out the skip-innodb settings for some reason.
very odd, but all seems ok now. |
Code: | rm -rf /var/lib/mysql/ib* |
saved me too after an
Code: | emerge --newuse world |
thanks, for posting the fix
|
|
Back to top |
|
|
|