PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : MySQL unter SuSE 8.1



MeneniusAgrippa
01.07.03, 20:18
Hi.
Ich hab' ein kleines Problem.
Ich hab auf meinem Router-Server jetzt SuSE 8.1 laufen, und soweit funktioniert uach alles.... bis auf MySQL ...

Der Apache läuft wunderbar, aber MySQL meckert immer:



Server:/etc # mysql start
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


:(

Die Datei ist auch gar nicht da, MySQL sollte aber eigendlich korrekt installiert sein (bei der SuSE-Installation mit installiert).

Ich hoffe, ihr könnt mir helfen :'(

MfG Mene

$kuLL
01.07.03, 20:26
du musst den mysqld starten
#mysqld

MeneniusAgrippa
01.07.03, 20:36
mhhh......



Server:/srv/www/htdocs # mysqld
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
030701 22:35:57 Aborting

030701 22:35:57 mysqld: Shutdown Complete



:(

MfG Mene

$kuLL
01.07.03, 20:45
als normaler user den befehl!

wenn das auch ned klappt:
#mysql_install_db

MeneniusAgrippa
01.07.03, 20:52
mhhh ... :(



guse@Server:/srv/www/htdocs> mysqld
bash: mysqld: command not found


bzw.




guse@Server:/srv/www/htdocs> mysql_install_db
mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied
chmod: failed to get attributes of `/var/lib/mysql/mysql': No such file or directory
mkdir: cannot create directory `/var/lib/mysql/test': Permission denied
chmod: failed to get attributes of `/var/lib/mysql/test': No such file or directory
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1049 Unknown database 'mysql'
030701 22:52:18 Aborting

030701 22:52:18 /usr/sbin/mysqld: Shutdown Complete

Installation of grant tables failed!

Examine the logs in /var/lib/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
You can 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!


:(

soetwas doofes ....

Du hast aber mitbekommen, dass die mysql.sock gar nicht existiert, oder? ;)

MfG Mene

$kuLL
01.07.03, 20:59
also das mysql_install_db musst du al root ausführen, is ja klar wenn da steht permission denied!

und dann suchst du den befehl 'mysqld_safe' und führst ihn aus, nich einfach nur eintippen sondern den absoluten pfad angeben

dann müsste der mysqld laufen

ps: wenn der dämon nicht läuft gibt es die datei auch noch nicht

MeneniusAgrippa
01.07.03, 21:15
Server:/ # mysql_install_db
Installing all prepared tables
030701 23:11:18 /usr/sbin/mysqld: Shutdown Complete


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h Server password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!


You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com




so weit so gut ...


aaaaaber



Server:/ # mysql status
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Server:/ # mysqld
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
030701 23:12:05 Aborting

030701 23:12:05 mysqld: Shutdown Complete



:(

MfG Mene

$kuLL
01.07.03, 21:23
nochmal als normaler user versucht???
ansonsten bitte nochmal
#mysqld_safe

Berufspenner
01.07.03, 21:24
Hi@all

Such zu mysqld auch mal den absuluten Pfad und führe es damit als User aus. Also /Pfad/zu/mysqld/mysqld

Cu
André

MeneniusAgrippa
01.07.03, 21:28
Server:/ # mysqld_safe
bash: mysqld_safe: command not found
Server:/ # su guse
guse@Server:/> mysqld_safe
bash: mysqld_safe: command not found


mhh .. wie finde ich denn den Pfad raus??? *ggg*

Wo liiegt das denn normalerweise? :D

MfG Mene

Berufspenner
01.07.03, 21:38
Hi@all
mhh .. wie finde ich denn den Pfad raus??? *ggg* Entweder mit
whereis mysqld oder mit
find / -name "mysqld" Da gibt es aber auch noch weitere Methoden.

Cu
André

MeneniusAgrippa
01.07.03, 21:43
is das richtig, dass das in einer gz-Datei is? :-S

/usr/sbin/mysqld /usr/share/man/man1/mysqld.1.gz

Wie muss ich das denn jetzt aufrufen? :(

MfG Mene

Berufspenner
01.07.03, 22:02
Original geschrieben von MeneniusAgrippa
is das richtig, dass das in einer gz-Datei is? :-S

/usr/sbin/mysqld /usr/share/man/man1/mysqld.1.gz

Wie muss ich das denn jetzt aufrufen? :(

MfG Mene Du willst doch ein Programm und kein Archiv starten. Also nimmst du /usr/sbin/mysqld

Cu
André

MeneniusAgrippa
01.07.03, 22:07
ich verzweiel hier langsam? :'(



guse@Server:/> /usr/sbin/mysqld
030702 0:05:54 Can't start server : Bind on unix socket: Permission denied
030702 0:05:54 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
030702 0:05:54 Aborting

030702 0:05:54 /usr/sbin/mysqld: Shutdown Complete




bzw.




Server:/ # /usr/sbin/mysqld
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
030702 0:06:20 Aborting

030702 0:06:20 /usr/sbin/mysqld: Shutdown Complete



ok, also als normaler User ... aber was soll da denn shcon laufen, verdammt?!? da läuft ja nix! X(

MfG Mene

$kuLL
02.07.03, 00:21
so mach mal ein
#ps -ef | grep mysql

dann mit
#kill -9 xxxx

alle mysql-prozesse killen
für xxxx setzt du die erste zahl ein, die vor den prozessen steht

als nächstes bitte ein
#ls -la /var/lib/mysql

sollten hier bei der ausgabe dateien wie 'test' und 'mysql' auftauchen, dann bitte folgendes eingeben:
wenn du mysql version 3.x benutzt:
#safe_mysqld --user=mysql &
wenn du mysql version 4.x benutzt:
#mysqld_safe --user=mysql &

sollten die dateien 'mysql' und 'test' nicht auftauchen, dann nochmals
mysql_install_db aufrufen

wenn das wieder fehlschlägt --> mysql deinstallieren und neueste version von www.mysql.com saugen

mehr fällt mir im moment nicht ein
gn8

swen1
02.07.03, 07:23
Also ich starte MySQL mit "/usr/local/mysql/bin/mysqld_safe &", aber ich glaube bei älteren Versionen (3.23.xx) ist es andersrum "safe_mysqld". Der Pfad ist bei Dir natürlich anders!

Gruß Swen

ObiJan
02.07.03, 09:29
Hi,

startemal den RunlevelEditor bei Yast2 und starte MySQL automatisch im Runlevel 5. schau mal, ob's klappt.

Gruß
Obi