PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : mysql server will nicht wie ich will



AlleyJazz
10.08.08, 21:15
Halli Hallo alle zusammen,

ich steh mal wieder aufm Schlauch...

Für ein Programm (verlihub) brauch ich eine lokal laufende mysql-datenbank. Laufen heisst hier wohl, dass es eine existierende Datenbank für einen Benutzer geben soll.
Dafür hab ich die Pakete mysql, mysql-client, mysql-common (alle in Version 5.0.51a) und perl-DBD-mysql (Version 4.006) installiert. libmysql15 war bereits installiert.

Nach der Installation sehe ich einige Infos zur neuen Version, die mir wohl was sagen sollen, es aber nicht tun.

Zum einen gibt es 2 Warnungen:

Warning: netfs is needed by mysqld in runlevel 2
Warning: fuse is needed by mysqld in runlevel 2

zum anderen wird mir folgendes nahegelegt:

Please note you also need to add a user in the /etc/mysqlmanager.passwd file and
make sure the file is owned by the user under which the Instance Manager service
is running under.
Problem: die Datei ist leer. Daher keine Ahnung, wie ich dort einen Benutzer eintragen soll...

Die Dokumentation empfiehlt, mysql_install_db aufzurufen nach erfolgter Installation, aber zum einen

The generation of the initial system mysql database is now done when mysql
is started from the initscript and only if the /var/lib/mysql/mysql
directory is empty (mysql_install_db). Previousely this was quite hidden and
silently done at (rpm) install time.,

und zum anderen gibt es eh einen Fehler beim Aufruf:

[root@localhost alleyjazz]# mysql_install_db
Installing MySQL system tables...
ERROR: 1004 Can't create file '/root/tmp/#sql553b_1_0.frm' (errno: 13)
080810 21:07:48 [ERROR] Aborting

080810 21:07:48 [Note] /usr/sbin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!


Ich bin doch recht ratlos mittlerweile... ich will doch nur einen kleinen mysql-server zum laufen kriegen! Menno! </kleineskindmodus>


Nunja, bin froh über jeden Tipp!

Achso: Mandriva 2008.1, KDE3.5.9, kernel2.6.25.4


AlleyJazz

marce
10.08.08, 21:19
wie hast Du denn den mysql-Server installiert? Wie ist die my.cnf?

AlleyJazz
10.08.08, 21:33
hm, im Grunde hab ich ja nach der Installation der genannten Pakete nichts mehr getan, jedenfalls nichts, das nicht mit einer Fehlermeldung quittiert worden wäre.

die my.cnf in /etc scheint ziemlich original zu sein.
Für den client ist ein user (root) eingetragen, die zugehörige Passwort-Zeile auskommentiert.
Für den Server ist user=mysql

Liegt da eventuell der Hase im Pfeffer beerdigt?

Die Ports sind in beiden Bereichen auf den gleichen (3306) gestellt.
Sonst fällt mir jetzt nichts auf, aber falls nötig kann ich die Datei hier gern mal reinstellen.


AlleyJazz

marce
11.08.08, 07:05
Das Posting bietet keinerlei Information. Bitte keine Prosa schreiben sondern Fakten liefern.

AlleyJazz
11.08.08, 16:25
Bitte keine Prosa
Sorry, passiert mir immer wieder. Vorteil: gut lesbar - Nachteil: bringt keinem was :(

Also: die Eingabe von mysqld bringt folgendes:


[root@localhost alleyjazz]# mysqld
mysqld: Can't create/write to file '/root/tmp/ib2rFxhr' (Errcode: 13)
080811 16:02:03 InnoDB: Error: unable to create temporary file; errno: 13
080811 16:02:03 [Note] mysqld: ready for connections.
Version: '5.0.51a' socket: '/var/lib/mysql/mysql.sock' port: 0 Mandriva Linux - MySQL Standard Edition (GPL)

der Prozess ist zwar aktiv, aber die Installationsroutine von verlihub bringt folgende [Fehler] Ausgabe:

[root@localhost alleyjazz]# vh_install
--------------------------------
Your name ? (alleyjazz)

Hello alleyjazz,
let's start with configuration of database access..

--------------------------------
mysql database for verlihub will be called? (mysql)
mysql user to access mysql gonna be? (mysql)
password to access mysql be? (xxxxxxxxxxxxx)
mysql server will run where? (localhost)
--------------------------------
user = mysql
password = xxxxxxxxxxxxx
host = localhost
database = mysql
--------------------------------
This database account cannot be accessed
--------------------------------
Is this info correct ? (Y/N)Y
Do you want to create database now? (Y/N)Y
--------------------------------
Ok preparing mysql..
You probably need administrator access to mysql database
mysql administrator username? (root)

--------------------------------

You'll be now promted by mysql client for password of root@localhost
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
--------------------------------
WARNING: This database account cannot be accessed, consider starting the mysql server
--------------------------------

--------------------------------

alleyjazz, you need to choos a place for the configuration files
--------------------------------
The order of folder that verlihub is looking for is following:

1 - variable $VERLIHUB_CFG - -inexisting-
2 - ./.verlihub - /home/alleyjazz/.verlihub drwxr-xr-x
3 - /root/.verlihub - /root/.verlihub -inexisting-
4 - /usr/local/etc/verlihub - /usr/local/etc/verlihub -inexisting-
5 - /etc/verlihub - /etc/verlihub -inexisting-
if two or more of these exist, lower number has priority
--------------------------------

--------------------------------
what is will be the configuration folder ? (./.verlihub)
This config folder already exists and may be overwitten (with a backup)
--------------------------------
Do you want to continue with these settings (if not then select another folder) ? (Y/N)Y
Do you want to overwrite the existing configuration ? (Y/N)Y
--------------------------------
FYI: original configuration has been moved to ./.verlihub/_backup
Written: ./.verlihub/dbconfig

--------------------------------

ERROR: Your installation is NOT complete
Either you were unable to create database or config folder
Without both valid I cannot continue
Come back with necessary info, permissions and running mysql server and run me again

Meine /etc/my.cnf sieht folgerndermaßen aus (das ausge-x-te Passwort entspricht dem in der vh_install.


# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#

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

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
user = mysql
datadir = /var/lib/mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
pid-file = /var/run/mysqld/mysqld.pid
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
collation_server = utf8_unicode_ci
character_set_server = utf8

# Default to using old password format for compatibility with old and
# shorter password hash.
# Reference: http://dev.mysql.com/doc/mysql/en/Password_hashing.html
old_passwords

# 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=mysql-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 = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-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

#bind-address=192.168.100.1

## Options for mysqld process:
#ndbcluster # run NDB engine
#ndb-connectstring=192.168.0.10 # location of MGM node

## Options for ndbd process:
#[mysql_cluster]
#ndb-connectstring=192.168.0.10 # location of MGM node

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
default-character-set = utf8

[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

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

# MySQL Instance Manager options section
[manager]
user=mysql
default-mysqld-path=/usr/sbin/mysqld
socket=/var/lib/mysql/mysqlmanager.sock
pid-file=/var/run/mysqld/mysqlmanager.pid
password-file=/etc/mysqlmanager.passwd
run-as-service
monitoring-interval=20
port=2273
#bind-address=192.168.100.1


Im Verlihub-Forum fand ich den Tip, es mit ldconfig zu versuchen (einfach einmal starten), aber das brachte keinerlei Änderung der Situation.

Ich nehme nun an, es liegt an mysql, bzw. an einer unfertigen Einrichtung... aber was fehlt mir da genau?


Bin weiterhin dankbar für jeden Hinweis!

AlleyJazz

AlleyJazz
12.08.08, 15:52
so, bin nun einen Schritt weitergekommen... ich hab einfach mal die my.cnf dahingehend bearbeitet, dass überall als user root drinsteht, also bei

[client]
user = root

[mysqld]
user = root

[mysql.server]
user=root

[manager]
user=root

Vermutlich war die Hälfte davon überflüssig, aber wenigstens kommt nun beim Starten von mysqld kein Fehler mehr, sondern es werden einige Tabellen angelegt (beim ersten Start), seither heisst es

[root@localhost alleyjazz]# mysqld
080812 15:43:20 InnoDB: Started; log sequence number 0 43655
080812 15:43:20 [Note] mysqld: ready for connections.
Version: '5.0.51a' socket: '/var/lib/mysql/mysql.sock' port: 0 Mandriva Linux - MySQL Standard Edition (GPL)

Zwar läuft vh_install immer noch nicht so durch wie es sein sollte - am Ende heisst es immer
ERROR: Your installation is NOT complete
Either you were unable to create database or config folder
Without both valid I cannot continue
Come back with necessary info, permissions and running mysql server and run me again - aber das dürfte jetzt ein Problem mit verlihub sein, nicht mit mysql.

Der config-folder exisitiert, ich gehe momentan eher davon aus dass ich die falschen Parameter übergebe zum erstellen der nötigen Database.

Falls mir da einer helfen kann, gerne, ansonsten führe ich die sache im verlihub-forum weiter.


Gruß
AlleyJazz

Theo Retisch
14.08.08, 19:39
Naja, einen MySQL-Server komplett als root laufen zu lassen ...

Setz lieber die tmpdir-Variable in der Config auf etwas Sinnvolles.

Außerdem solltest Du überprüfen, ob Benutzer und Gruppe für Deinen MySQL-Server vorhanden sind (getent passwd, getent group).

Achso: und wenn der Server dann fehlerfrei durchstartet, probier vor der Installation Deiner Anwendungen erstmal, ob Du über "mysql" auf das DBMS Zugriff hast.

Ansonsten poste /var/log/mysql.log und die Fehlermeldungen, die erscheinen.