PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : problem beim starten von mysql



GU4RDI4N
17.04.05, 10:22
hi,
ich habe grade mein linux (SUSE Linux Personal 9.1) wegen massig Problemen neuinstalliert.
Gleich nach der installation habe ich über yast(Software installieren oder löschen) Apache,PHP und MySQL (alle Packete die damit verbunden waren)
installiert. Apache und PHP lief problemlos,
aber beim Start von MySQL kam die meldung:


dhcppc1:~ # /etc/init.d/mysql start
Creating MySQL privilege database and starting MySQL...
hostname: Unknown host
Neither host '' and 'localhost' could not be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
failed
dhcppc1:~ #


also habe ich in den datein "/etc/my.cnf" und "/etc/mysqlacces.conf" den Host auf "Localhost", user auf "root" und das passwort eingestellt.
das hat allerdings nichts an dem Problem geändert.
(genau die gleiche Fehler-meldung wie oben)

jetzt weis ich leider auch nicht weiter.
könntet ihr mir bitte weiterhelfen?

GR4RDI4N

(geschrieben von einem MySQL anfänger)

temir
18.04.05, 20:45
Ausgabe von `hostname`?

Svenny
18.04.05, 21:16
was steht in der /etc/hosts ?

GU4RDI4N
22.04.05, 15:15
hier der inhalt der /etc/hosts:


#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 gerrit.localhost gerrit


und das ergebniss von "hostname":


dhcppc3:~ # hostname
dhcppc3
dhcppc3:~ #

tha_dude
22.04.05, 15:47
und ein "nslookup dhcppc3" bringt auch die gewünschte IP-Adresse?

GU4RDI4N
22.04.05, 16:01
ergebniss:


dhcppc3:~ # hostname
dhcppc3
dhcppc3:~ # nslookup dhcppc3
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find dhcppc3: NXDOMAIN

dhcppc3:~ #

tha_dude
22.04.05, 16:13
und wenn du "ping dhcppc3" eingibst?

GU4RDI4N
22.04.05, 16:20
dhcppc3:~ # ping dhcppc3
ping: unknown host dhcppc3
dhcppc3:~ #

tha_dude
22.04.05, 16:26
vielleicht solltest du deine /etc/hosts um den Eintrag:

192.168.1.X dhcppc3 ergänzen

oder soll die IP-Adresse von nem dhcp-server verteilt werden?

temir
22.04.05, 16:33
Abhilfe kann vielleicht auch die Option 'skip-resolve-name' oder ähnlich bringen
(Details siehe Mysql-Docu, bzw. `mysqld --help |grep skip` )

tha_dude
22.04.05, 16:42
das kann natürlich sein.

Ich denke aber mal, dass der apache auch nicht richtig laufen wird, da er seinen eigenen Namen ja nicht erkennt.

GU4RDI4N
22.04.05, 16:53
stimmt,
ich merk grade das mein apache auch nicht mehr startet.

aber nach der änderung startet jetzt wenigstens mysql problemlos.
aber apache will weiterhin nicht mehr:



/etc/init.d/apache2 start gab 7 (Programm wird nicht ausgeführt) zurück:
Starting httpd2 (prefork) ..failed

tha_dude
22.04.05, 17:06
Wenn Du Dich jetzt selbst namentlich pingen kannst, sollte es daran nicht liegen.
Kannst ja mal in den Log-Dateien (Debian: /var/log/apache/... gucken, woran das liegen kann und die Fehlermeldung dann hier posten.

GU4RDI4N
22.04.05, 17:10
hier der inhalt der /var/log/apache2/error_log


[Sat Apr 16 22:58:14 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Apr 16 22:58:14 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sat Apr 16 22:58:15 2005] [notice] Apache/2.0.49 (Linux/SuSE) configured -- resuming normal operations
[Sat Apr 16 23:15:18 2005] [notice] caught SIGTERM, shutting down
[Sun Apr 17 09:53:34 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Apr 17 09:53:34 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sun Apr 17 09:53:35 2005] [notice] Apache/2.0.49 (Linux/SuSE) configured -- resuming normal operations
[Sun Apr 17 10:02:17 2005] [notice] Graceful restart requested, doing restart
[Sun Apr 17 10:02:17 2005] [notice] Apache/2.0.49 (Linux/SuSE) configured -- resuming normal operations
[Sun Apr 17 12:22:49 2005] [notice] caught SIGTERM, shutting down
[Sun Apr 17 17:10:17 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Apr 17 17:10:17 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sun Apr 17 20:07:23 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Apr 17 20:07:23 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Mon Apr 18 07:17:37 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Apr 18 07:17:37 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 15:09:50 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 15:09:50 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:24:03 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:24:03 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:24:22 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:24:22 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:25:12 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:25:12 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:51:04 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:51:04 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:54:03 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:54:03 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Fri Apr 22 16:56:06 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Apr 22 16:56:06 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

tha_dude
22.04.05, 17:16
vielleicht hilft das weiter:

http://www.linuxforen.de/forums/showthread.php?t=167302&highlight=apache2+session+cache

und der im Thema unten stehender Link ?

GU4RDI4N
22.04.05, 18:38
danke,
jetz startet alles.

aber beim einloggen kommt:


dhcppc3:~ # mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
dhcppc3:~ #


hier der inhalt von my.cnf:


# Example mysql config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# a important part and systems up to 128M very MySQL is used together with
# other programs (like a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --help option.

# The following options will be passed to all MySQL clients
[client]
password = xxxxxxx
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
# log-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
master-host = localhost
#
# The username the slave will use for authentication when connecting
# to the master - required
master-user = root
#
# The password the slave will authenticate with when connecting to
# the master - required
master-password = xxxxxxx
#
# The port the master is listening on.
# optional - defaults to 3306
master-port = 3306
#
# binary logging - not required for slaves, but recommended
#log-bin

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

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

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character 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


und mysqlacces.conf:


# ------------------------------------------------------------------------- #
# MySQLaccess version 2.0p2 #
# (c) Yves.Carlier@rug.ac.be, 1997 #
# #
# *** Configuration file *** #
# #
# -Default values read by mysqlaccess during initialisation. #
# This file is looked for in #
# 1) the current directory #
# 2) /etc/ #
# -Options given on the command-line override the values given in here #
# -Given options can't be overruled by empty/blanc options!! #
# ------------------------------------------------------------------------- #


# ----------------#
# Global settings #
# --------------- #
$Param{'host'} = 'localhost';
$Param{'user'} = 'root';
$Param{'db'} = 'test';
$Param{'password'} = 'xxxxxxx';
$Param{'debug'} = 0;

# --------------------------#
# Settings for Command-line #
# ------------------------- #
if ($CMD) {
$Param{'superuser'} = 'root';
$Param{'rhost'} = 'localhost';
$Param{'spassword'} = 'xxxxxxxx';
$Param{'brief'} = 1;
}

# ---------------------#
# Settings for CGI-BIN #
# -------------------- #
if ($CGI) {
$Param{'superuser'} = 'root';
$Param{'rhost'} = 'localhost';
$Param{'spassword'} = 'xxxxxxx';
$Param{'table'} = 1;
}

1; #to make require happy



EDIT: ich sehe grade das gar kein password festgelegt ist. aber in den beiden datein ist eins angegeben. wie kann ich das korrigieren?