# [SOLVED] MySQL 5.0.40 startet nicht

## Pegasus87

Moin,

hab gerade eine neue Version von mySQL gemerged, da stell ich fes, dass sich der Server nun nicht mehr starten lässt. Ich bekomme lediglich: 

```
/etc/init.d/mysql start

 * Starting mysql ...

 * Starting mysql (/etc/mysql/my.cnf)

 * MySQL NOT started (1)
```

Auch mit dem höchsten debuglevel in /etc/conf.d/mysql bekomme ich keine Infos, die irgendwie weiterhelfen könnten: 

```
/etc/init.d/mysql start

 * Caching service dependencies ...

/etc/conf.d/net: line 4: default gw 192.168.2.1: command not found

/etc/conf.d/net: line 4: default gw 192.168.2.1: command not found

 *  Service 'metalog' already provides 'logger'!;

 *  Not adding service 'syslog-ng'...

 *  Service 'cupsd' should be AFTER service 'vmware', but one of

 *  the services 'vmware' depends on, depends on 'cupsd'!                                                              [ ok ]

dbg:  >>> start()

 * Starting mysql ...

dbg:  >>> get_slot_config()

dbg:  srv                0

dbg:  srv_slot           0

dbg:  srv_num

dbg:  tmp_eval           mysql_slot_0[@]

dbg:  conf_d_parameters

dbg:  MY_SUFFIX

dbg:  chroot dir =>

dbg:  niceness   =>

dbg:  basedir    => /usr

dbg:  datadir    => /var/lib/mysql

dbg:  pidfile    => /var/run/mysqld/mysqld.pid

dbg:  socket     => /var/run/mysqld/mysqld.sock

dbg:  Unamanged  =>

dbg:  <<< get_slot_config() ok

dbg:  >>> checkconfig("/var/lib/mysql")

dbg:  <<< checkconfig() ok

 * Starting mysql (/etc/mysql/my.cnf)

dbg:  starting mysqld with: --defaults-file=/etc/mysql/my.cnf   --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock

Starting /usr/sbin/mysqld...

Detaching to start /usr/sbin/mysqld...done.

dbg:

dbg:

 * MySQL NOT started (1)

dbg:  <<< start() 
```

Ich kann mir nicht vorstellen, dass das mit den Fehlern beim logger zutun hat, bei anderen daemons tritt der Fehler auch auf und wirkt sich nicht negativ aus.

Kennt einer das Problem?Last edited by Pegasus87 on Sat Jun 02, 2007 5:48 pm; edited 1 time in total

----------

## himpierre

Ich denke mal die Informationen in den Logfiles könnten hilfreich sein. Unter /var/log/mysql/ läßt sich sicher etwas finden.

----------

## Pegasus87

Negativ, ich hab mysql.log und mysql.err, sind aber beide "leer", lediglich fehler der alten Version.

----------

## Pegasus87

Ich poste noch mal die /etc/conf.d/mysql :

```
#  Here is where we define which server(s) to start.

#  Additional parameters to be passed to mysqld at startup may be added here,

#  which will override the ones in "my.cnf".

#

#  Below are described some suggested parameters to use.

#  The parameters not recognized will be passed through to the mysqld daemon

#  directly!

#  To avoid starting a server just comment it's definition.

#

#  Last but not least, SPACES are NOT allowed inside the parameters!

#

#  Parameter      : description

# ----------------+-----------------------------------------------------------

# nice            : integer [-20 .. 19 ] default 0

#                 : change the priority of the server -20 (high) to 19 (low)

#                 : see "man nice 1" for description

# ----------------+-----------------------------------------------------------

# mycnf           : string [full path to my.cnf]

#                 : specify the path to my.cnf file to be used

# ----------------+-----------------------------------------------------------

# startup_timeout : integer [seconds] default 15

#                 : time to wait for mysqld up and running, after this it's

#                 : marked as failed

# ----------------+-----------------------------------------------------------

#

#  Additional parameters

#  Parameter      : description

# ----------------+-----------------------------------------------------------

# server-id       : integer [1 .. 255]

#                 : Uniquely identifies the server instance in the community

#                 : of replication partners.

# ----------------+-----------------------------------------------------------

# port            : integer [1025 .. 65535] default 3306

#                 : Port number to use for connection.

#                 : Looses any meaning if skip-networking is set.

# ----------------+-----------------------------------------------------------

# skip-networking : NULL

#                 : Don't allow connection through TCP/IP.

# ----------------+-----------------------------------------------------------

# log-bin         : string [name of the binlog files]

#                 : Log update queries in binary format. Optional (but

#                 : strongly recommended to avoid replication problems if

#                 : server's hostname changes) argument should be the chosen

#                 : location for the binary log files.

# ----------------+-----------------------------------------------------------

# Additionally the following variables are recognized:

#

# Be more verbose, accepts values from 1 to 4

DEBUG=4

#

# The default location for the "master" pid file

MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld"

#

# The timeout for a failed attempt to stop a server

STOPTIMEOUT=120

#

# The parameters are passed in a bash array variable,

# the variable name is mysql_slot_0_[server-num]

# "server-num" is an optional number used to start multiple servers

#

# Examples:

#

# start a default server with default options:

mysql_slot_0=()

#

# start MySQL reniced, overriding some start parameters

#mysql_slot_0=(

#   "nice=-5"

#   "server-id=123"

#   "log-bin="myhost"

#   "port=3307"

#)

#

# start another server, different my.cnf

#mysql_slot_0_1=(

#   "mycnf=/home/test/my.cnf"

#   "server-id=124"

#)

#

```

Und die /etc/mysql/my.cnf

```

#

#  Last but not least, SPACES are NOT allowed inside the parameters!

#

#  Parameter      : description

# ----------------+-----------------------------------------------------------

# nice            : integer [-20 .. 19 ] default 0

#                 : change the priority of the server -20 (high) to 19 (low)

#                 : see "man nice 1" for description

# ----------------+-----------------------------------------------------------

# mycnf           : string [full path to my.cnf]

#                 : specify the path to my.cnf file to be used

# ----------------+-----------------------------------------------------------

# startup_timeout : integer [seconds] default 15

#                 : time to wait for mysqld up and running, after this it's

#                 : marked as failed

# ----------------+-----------------------------------------------------------

#

#  Additional parameters

#  Parameter      : description

# ----------------+-----------------------------------------------------------

# server-id       : integer [1 .. 255]

#                 : Uniquely identifies the server instance in the community

#                 : of replication partners.

# ----------------+-----------------------------------------------------------

# port            : integer [1025 .. 65535] default 3306

#                 : Port number to use for connection.

#                 : Looses any meaning if skip-networking is set.

# ----------------+-----------------------------------------------------------

# skip-networking : NULL

#                 : Don't allow connection through TCP/IP.

# ----------------+-----------------------------------------------------------

# log-bin         : string [name of the binlog files]

#                 : Log update queries in binary format. Optional (but

#                 : strongly recommended to avoid replication problems if

#                 : server's hostname changes) argument should be the chosen

#                 : location for the binary log files.

# ----------------+-----------------------------------------------------------

# Additionally the following variables are recognized:

#

# Be more verbose, accepts values from 1 to 4

DEBUG=4

#

# The default location for the "master" pid file

MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld"

#

# The timeout for a failed attempt to stop a server

STOPTIMEOUT=120

#

# The parameters are passed in a bash array variable,

# the variable name is mysql_slot_0_[server-num]

# "server-num" is an optional number used to start multiple servers

#

# Examples:

#

# start a default server with default options:

mysql_slot_0=()

#

# start MySQL reniced, overriding some start parameters

#mysql_slot_0=(

#   "nice=-5"

#   "server-id=123"

#   "log-bin="myhost"

#   "port=3307"

#)

#

# start another server, different my.cnf

#mysql_slot_0_1=(

#   "mycnf=/home/test/my.cnf"

#   "server-id=124"

#)

#

```

# /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

# 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  :Wink: 

#log                                            = /tmp/mysqld.sql

#gdb

#debug                                          = d:t:i :Surprised: ,/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  :Sad: 

# 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[/code]

Vielleicht hilft das weiter.

----------

## himpierre

Und wenn Du mysql ohne das init script startest, was passiert dann?

----------

## Pegasus87

```
mysqld

070602 19:10:07 [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=athlonxp-bin' to avoid this problem.

070602 19:10:08  InnoDB: Started; log sequence number 0 43655

070602 19:10:08 [ERROR] Can't start server : Bind on unix socket: Permission denied

070602 19:10:08 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?

070602 19:10:08 [ERROR] Aborting

070602 19:10:08  InnoDB: Starting shutdown...

070602 19:10:10  InnoDB: Shutdown completed; log sequence number 0 43655

070602 19:10:10 [Note] mysqld: Shutdown complete

```

Die Datei /var/run/mysqld/mysqld.sock existiert nicht!

----------

## Pegasus87

Also den Fehler hab ich gefunden, /var/run/mysqld war auf root:root gestellt, statt auf mysql:mysql, das Problem ist behoben...

Nun hab ich folgendes:

```
mysqld

070602 19:17: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=athlonxp-bin' to avoid this problem.

070602 19:17:55  InnoDB: Started; log sequence number 0 43655

070602 19:17:55 [Warning] './mysql/host' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed

070602 19:17:55 [Warning] './mysql/user' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed

070602 19:17:55 [Warning] './mysql/db' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed

070602 19:17:55 [ERROR] Fatal error: mysql.user table is damaged or in unsupported 3.20 format.

```

----------

## Pegasus87

Hab die alten Datenbanken gelöscht und ein emerge --config mysql gemacht, nun gehts wieder!

----------

