PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : mysql perm



joey.brunner
25.12.02, 12:21
hi,

ich komm nicht mehr in meine datenbank. was passiert ist weiss ich auch nicht. ich benutzte die aktuelle mysql stable... keinen plan warum das nciht mehr geht. hat jemand eine idee was ich jetzt machen soll. egal ob mit oder ohne passwort egal welcher user.. es geht einfach nicht mehr. was ihc mir vorstellen koennte, dass die mysql datenbank mit den rechten irgendwie beschaedigt ist...

joey

rabenkind
25.12.02, 23:17
hi joey.brunner

zitat
Hi,

in der mysql-Doku steht dazu:

quote:After a fresh installation, you should connect to the server and set up your users and their access permissions:


shell> mysql -u root mysql

The server should let you connect because the MySQL root user has no password initially. That is also a security risk, so setting the root password is something you should do while you're setting up your other MySQL users. If you try to connect as root and get this error:


Access denied for user: '@unknown' to database mysql

this means that you don't have an entry in the user table with a User column value of 'root' and that mysqld cannot resolve the hostname for your client. In this case, you must restart the server with the --skip-grant-tables option and edit your `/etc/hosts' or `\windows\hosts' file to add an entry for your host.


Auf deutsch: Du muß Dich nach einer Neuinstallation mit

code:shell> mysql -u root mysql

ein loggen. Sollte dies fehlschlagen mit einer Fehlermeldung ala

code:Access denied for user: '@unknown' to database mysql

oder

code:Access denied for user: '@localhost' to database mysql

oder

code:Access denied for user: 'root@localhost' to database mysql

Dann solltest Du mit

code:mysqld --skip-grant-tables

neustarten und die entsprechenden Einträge vornehmen

code:mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%"
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

Oder

code:mysql> INSERT INTO user VALUES('localhost','root',PASSWORD('some_pass'),
-> 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y
','Y');
mysql> INSERT INTO user VALUES('%','root',PASSWORD('some_pass'),
-> 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y
','Y');

Wenn dann der Daemon neu gestartet wird, müßte es gehen.

-= Pingu =-

__________________
RTFM:


* Linuxforen.de Suche
* SuSE Support Datenbank (auc für nicht SuSE Distributionen)
* Linux Documentation Projekt (inkl. aller HowTo)


wenn das so auch nicht hilft, lösch vorher die mysql.history

greetz rabenkind :))

joey.brunner
25.12.02, 23:49
herzlichen dank !