Page 1 of 1
mysql startet aber läuft nicht
Posted: 2004-08-26 03:27
by dirk0201
wenn ich mysql starte finde ich immer vollgende meldung in den logs.
aber sql läuft dann.
aber seite z.b. confixx kann ich nicht aufrufen.
kommt nur eine weiße seite.
es ist ein debian system.
und es handelt sich um 4.0.20
040826 03:21:08 Error at /etc/init.d/mysqln/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
040826 03:21:08 Error at /etc/init.d/mysqln/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
040826 03:21:08 mysqld started
Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line
/usr/sbin/mysqld: Warten auf Verbindungen.
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 13:48
by dirk0201
weiß den keiner wo dran es leigen könnte ?
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:00
by stefanpropehan
Kann es sein das noch ein mysqld im Hintergrund läuft?
Gibt es das Verzeichnis "/var/run/mysqld/" und hat der Benutzer unter dem der mysqld läuft dir Rechte darin zu schreiben?
Gruß Stefan
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:05
by dirk0201
ja das verzeichnis gibt es.
und die daten pid und sock werden auch reingeschrieben.
wie gesagt, mysql läuft ja.
kann es aber nicht benutzen und in den logs steht die oben stehende meldung.
achso, es ist ein frisch installiertes debian system.
es wurde also nicht upgadetet.
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:11
by stefanpropehan
poste mal dein init script (/etc/init.d/mysql)
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:13
by dirk0201
Code: Select all
#!/bin/sh
#
# MySQL daemon start/stop script.
#
# Debian version. Based on the original by TcX.
#
set -e
set -u
${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
test -x /usr/sbin/mysqld || exit 0
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
CONF=/etc/mysql/my.cnf
MYADMIN="/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf"
set +e # for deinstalling with deleted configs
ERRLOG=`perl -n -e '/^err-log[^=]*=s*(.*)/ && { print $1 }' < $CONF`
set -e
ERRLOG=${ERRLOG:-/var/log/mysql/mysql.err}
# Safeguard (relative paths, core dumps..)
cd /
umask 077
export PATH=/bin:/usr/bin
# mysqladmin likes to read /root/.my.cnf. This is usually not what I want
# as many admins e.g. only store a password without a username there and
# so break my scripts.
export HOME=/etc/mysql/
# "if" considers exit(0) as true so we can just pass mysqladmins exit code here.
# If mysqladmin does not exist the return code will be silently set to !0, too.
is_mysqld_alive () {
s=`$MYADMIN ping 2>&1`; rc=$?
if [ $rc != 0 ]; then
(echo "`date +'%y%m%d %H:%M:%S'` Error at $0n$s") >> $ERRLOG
fi
return $rc
}
case "${1:-''}" in
'start')
# check for config file
if [ ! -r /etc/mysql/my.cnf ]; then
echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian."
fi
# Start daemon
echo -n "Starting MySQL database server: mysqld"
/usr/bin/mysqld_safe > /dev/null 2>&1 &
for i in 1 2 3 4 5 6; do
if is_mysqld_alive; then break; fi
sleep 1
done
if is_mysqld_alive; then
echo "."
else
echo "...failed."
/bin/echo -e "tPlease take a look at $ERRLOG"
fi
;;
'stop')
# * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible
# at least for cron, we can rely on it here, too. (although we have
# to specify it explicit as e.g. sudo environments points to the normal
# users home and not /root)
echo -n "Stopping MySQL database server: mysqld"
if is_mysqld_alive; then
set +e
$MYADMIN shutdown
r=$?
set -e
if [ "$r" -ne 0 ]; then
echo "...failed"
echo -n "Killing MySQL database server by signal: mysqld"
killall -15 mysqld
server_down=
for i in 1 2 3 4 5 6 7 8 9 10; do
sleep 1
if is_mysqld_alive; then : ; else server_down=1; break; fi
done
if -z "$server_down"; then killall -9 mysqld; fi
fi
fi
if is_mysqld_alive; then
echo "...failed."
echo "Please stop the daemon yourself!"
exit -1
else
echo "."
fi
;;
'restart')
set +e; $SELF stop; set -e
$SELF start
;;
'reload'|'force-reload')
echo -n "Reloading MySQL database server: mysqld"
$MYADMIN reload
echo "."
;;
'status')
$MYADMIN version
;;
*)
echo "Usage: $SELF start|stop|restart|reload|force-reload"
exit 1
;;
esac
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:18
by stefanpropehan
und jetzt noch einmal die "/etc/mysql/debian.cnf"
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:21
by dirk0201
ich poste dir mal beide.
die debian.cnf
und my.cnf
Code: Select all
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = ################
Code: Select all
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.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.
#
# 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...
[client]
#password = my_password
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]
err-log = /var/log/mysql/mysql.err
socket = /var/run/mysqld/mysqld.sock
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
#
# You can also put it into /var/log/mysql/mysql.log but I leave it in /var/log
# for backward compatibility. Both location gets rotated by the cronjob.
#log = /var/log/mysql.log
log = /var/log/mysql/mysql.log
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
#
# The skip-networking option will no longer be set via debconf menu.
# You have to manually change it if you want networking i.e. the server
# listening on port 3306. The default is "disable" - for security reasons.
#skip-networking
key_buffer = 16M
max_allowed_packet = 1M
thread_stack = 128K
#
# Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 26214400
query_cache_type = 1
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication
#server-id = 1
#log-bin = /var/log/mysql/mysql-bin.log
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
#
# Read the manual if you want to enable InnoDB!
skip-innodb
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
max_allowed_packet = 20M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:27
by stefanpropehan
mhh versuche dich doch mal von der console aus mit dem root Benutzer und dem Password was du beim Installieren vergeben hast zu connecten....
die Fehlermeldung sagt ja nur aus das das tool mysqladmin sich nicht connecten kann (evtl den debian-sys-maint Benutzer geändert?)
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:34
by dirk0201
ich kann mich einloggen mit dem befehl.
das ist ja das komische.
sql läuft, aber seiten die sql benutzen werden einfach nur weiß angezeigt.
der debian benutzer wurde nicht geändert.
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:50
by stefanpropehan
Ich nehme mal an das deine Seiten die mysql benutzen auf unterschiedlichen Datenbanken laufen und auch unterschiedliche Benutzer benutzen... hast du diese denn schon alle eingerichtet?
was sagt denn ein -
Code: Select all
use myslq;
select Host, User from user;
wenn du dich auf die Datenbank verbindest? (mysql -u root ...)
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 14:56
by dirk0201
das macht er alles ohne fehler.
er wechselt ebend in die datenbank mysql.
und bei dem anderen auch keine probs.
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 15:02
by stefanpropehan
Um noch einmal meine Frage zu wiederholen... Alle Benutzer und Datenbanken unter dem die verschiedenen Seiten laufen sind in myslq schon eingerichtet?
Es kann jetzt nur noch ein Rechte Problem sein... da der mysqld ja läuft und du dich drauf verbinden kannst...
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 15:06
by dirk0201
ja, es ist alles eingerichtet.
nur ebend diese meldung und das die seiten nur weiß sind.
aber jetzt mal ne frage.
kann es sein, das in den paken von
http://www.dotdeb.org bugs bekannt sind ?
weil wenn ich die original version, also die alte originale von debian installiere dann läuft alles.
sobald ich die 4.0.20 von
http://www.dotdeb.org installiere kommt dieser fehler.
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 15:36
by stefanpropehan
Hast du nach dem Update von der 3.x auf 4.0.20 Version das folgende Script laufen lassen?
Bei mir laufen auch die Packete von dotdeb.org - ohne probleme!
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 15:52
by dirk0201
es wurde gar kein update gemacht.
es ist ein frisch installiertes system, wo ich von anfang an diese version drauf gemacht habe.
aber vielleicht kann es ja sein, dass genau das der fehler ist ???
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 16:03
by stefanpropehan
ja und wo kommen die datenbanken unter der vers. 4.0.20 her?
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 16:07
by dirk0201
die datenbanken sind backups die ich nach der installation einspiele.
aber ich habe jetzt debian neu aufgesetzt.
werde dann mal erst alles installieren, und dann die updates auf php 4.3.8 und mysql 4.0.20 machen.
mal gucken ob dann alles läuft :?:
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 16:11
by stefanpropehan
Spielst du etwas ein komplettes Datenbank dump mit der myslq db ( mysql Benutzer, Host Tabellen usw.) zurück? Dann ist kein wunder das das ganze nicht läuft - du mußt dann das weiter oben genannte Script laufen lassen...
Re: mysql startet aber läuft nicht
Posted: 2004-08-26 16:52
by dirk0201
alles klar.
der fehler ist behoben.
es lag einfach nur daran das ich die pake von anfang an installiert habe.
ich habe jetzt einfach erst alles aufgebaut mit den standart paketen von debian und dann erst upgedatet
und siehe das es läuft alles richtig ohne einen fehler in den logs :-D