• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] MySQL unter SUSE 11.1 keine Initialisierung möglich

gma

Member
Hallo,

ich habe gerade mein altes Suse 10.1 plattgemacht und 11.1 aufgesetzt, soweit so gut.

Jetzt möchte ich MySQL zum laufen bringen, welches ich über YAST installiert habe. Dem Handbuch entsprechend versuche ich jetzt die Grant-Tabellen zu initialisieren, leider funktioniert das überhaupt nicht:

Code:
 mysql_install_db
hostname: Unknown host
WARNING: The host '' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied
chmod: cannot access `/var/lib/mysql/mysql': No such file or directory
mkdir: cannot create directory `/var/lib/mysql/test': Permission denied
chmod: cannot access `/var/lib/mysql/test': No such file or directory
Installing MySQL system tables...
091001 13:02:18 [Warning] Can't create test file /var/lib/mysql/fb08-labor305.lower-test
091001 13:02:18 [Warning] Can't create test file /var/lib/mysql/fb08-labor305.lower-test
ERROR: 1049  Unknown database 'mysql'
091001 13:02:18 [ERROR] Aborting

091001 13:02:18 [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!

weiterhin habe ich probiert:
Code:
 /usr/bin/mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

und

Code:
/usr/sbin/mysqld --skip-grant &
[1] 13474
091001 13:11:00 [Warning] Can't create test file /var/lib/mysql/fb08-labor305.lower-test
091001 13:11:00 [Warning] Can't create test file /var/lib/mysql/fb08-labor305.lower-test
username:~> 091001 13:11:00  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

Also irgendwie funktioniert hier garnichts.

Liegt bestimmt unter anderem an den Rechten, verstehe aber nicht warum.

gm
 

marce

Guru
schon mal versucht, mysql ganz normal über das init-Script zu starten?

Ich wüßte keinen Grund, warum man expliziet selbst über die Binary unter /usr machen soll...
 
OP
G

gma

Member
wenn es das richtige Skript sein sollte:

Code:
 /etc/init.d/mysql  start
find: `/var/lib/mysql/.protected': Permission denied
find: `/var/lib/mysql/.protected': Permission denied
Creating MySQL privilege database... 
hostname: Unknown host
WARNING: The host '' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied
chmod: cannot access `/var/lib/mysql/mysql': No such file or directory
mkdir: cannot create directory `/var/lib/mysql/test': Permission denied
chmod: cannot access `/var/lib/mysql/test': No such file or directory

Wieder werden also Rechteprobleme beklagt.

gma
 

marce

Guru
lass mich raten - deine /usr/bin/mysqld-Versuche hast Du als Root gemacht?

Lösch einfach mal alles im /var/lib/mysql (inkl. dem Verzeichnis) und probier's erneut - direkt über das init-Script.
 

panamajo

Guru
gma schrieb:
ich habe gerade mein altes Suse 10.1 plattgemacht und 11.1 aufgesetzt, soweit so gut.
Was daran gut sein soll erschliesst sich mir nicht.

gma schrieb:
Code:
 mysql_install_db
hostname: Unknown host
WARNING: The host '' could not be looked up with resolveip.
Ohne korrekt gesetzten Hostnamen geht bzgl. MySQL (und einiger andere Dienste) gar nix.
 
OP
G

gma

Member
marce schrieb:
lass mich raten - deine /usr/bin/mysqld-Versuche hast Du als Root gemacht?

Lösch einfach mal alles im /var/lib/mysql (inkl. dem Verzeichnis) und probier's erneut - direkt über das init-Script.

nein, habe ich nicht!
 
OP
G

gma

Member
panamajo schrieb:
gma schrieb:
ich habe gerade mein altes Suse 10.1 plattgemacht und 11.1 aufgesetzt, soweit so gut.
Was daran gut sein soll erschliesst sich mir nicht.

gma schrieb:
Code:
 mysql_install_db
hostname: Unknown host
WARNING: The host '' could not be looked up with resolveip.
Ohne korrekte gesetzten Hostnamen geht bzgl. MySQL (und einiger andere Dienste) gar nix.

10.1->11.1: das wurde mir von sehr vielen Forumsmitgliedern angeraten, als es um andere Problemlösungen ging. Jetzt habe ich das Schlammassel, wieder alles von vorne aufsetzen zu müssen.


Hostnamen/IP:
hmmh, das hört sich sinnvoll an. Wo kann ich das tun? Irgendwie beziehe ich laut Network-Einstellungen auch meine IP per DHCP, das wird hier bei der Arbeit aber garnicht unterstützt!

gma

gma
 

spoensche

Moderator
Teammitglied
Per Yast->Netzwerkgeräte kannst du deine Netzwerkkarte konfigurieren.

Wenn du die IP per DHCP bekommst wird DHCP sehr wohl verwendet. Es ist viel zu aufwändig jedem einzelnen Rechner manuell eine IP zu vergeben.

PS:

Das Init Script musst du als User root ausführen.
 
OP
G

gma

Member
Das Init Script musst du als User root ausführen.

Danke, das war es! Ich wollte nichts auf eigene Faust als root ausführen, ich hatte vorher schon mal alles versaut, weil ich Privilegien falsch eingerichtet hatte!

Vielen Dank nochmals!!

Frage: war es das für die Einrichtung, sprich, kann ich MySQL jetzt nutzen (sieht zumindest so aus: QueryBrowser und Administrator lassen sich jeweils verbinden)?

andere Frage: richtet dieses Skript auch einen Autostart ein?

letzte (hoffentlich) letzte Frage: wo gibt es eine Anleitung für die Einrichtung von MySQL unter SUSE? Das MySQL Benutzerhandbuch hat mir nichts von einem solch netten Skript erwähnt gehabt!

gma
 
OP
G

gma

Member
ok, anscheindend geht das init-skript automatisch über den Runlevel-Editor zu starten.

Super! Danke!
 

panamajo

Guru
gma schrieb:
10.1->11.1: das wurde mir von sehr vielen Forumsmitgliedern angeraten, als es um andere Problemlösungen ging. Jetzt habe ich das Schlammassel, wieder alles von vorne aufsetzen zu müssen.
Den Schlamassel hast du weil du auf der 10.1 hockengeblieben bist anstatt rechtzeitig ein Update auf die nachfolgende Version durchzuführen.

gma schrieb:
Hostnamen/IP:
hmmh, das hört sich sinnvoll an. Wo kann ich das tun? Irgendwie beziehe ich laut Network-Einstellungen auch meine IP per DHCP, das wird hier bei der Arbeit aber garnicht unterstützt!
Woher und welche IP du bekommst hat mit dem Hostnamen nix zu tun. Den kann man normalerweise bei der Installation eingeben, später u.a. mit YaST:
Network Devices -> Network Settings -> Hostname/DNS
 
Oben