BSDForen.de  

Zurück   BSDForen.de > FreeBSD > FreeBSD - Installation

Antwort
 
Themen-Optionen Thema bewerten Ansicht
Alt 23.06.2004, 06:49   #1
Rabadag
Registered User
 
Benutzerbild von Rabadag
 
Registrierungsdatum: Apr 2004
Beiträge: 108
Rabadag eine Nachricht über ICQ schicken
Unhappy Hilfe mysql update nicht geht mehr..


Hi forum...

Hab auf meinem Webserver ein mysql update mit portupgrade -r von der
Version 4.1.1_1 nach 4.1.2 gemacht.
Update lief ohne Problehme durch.

Aber der schreck ist nah.
Kein einziger sql user hat zugriff auf die Datenbanken, als wären sie nimals erstellt worden.

ein
#mysql -uroot mysql
Access denied for user: ''@'localhost' to database 'msql'

#mysql -uroot -p mysql
Password:xxxx (damals gesetz)
Access denied for user: ''@'localhost' to database 'msql'

Was kann ich machen ?
Rabadag ist offline   Mit Zitat antworten
Alt 23.06.2004, 11:31   #2
indy
Der Hutträger
 
Registrierungsdatum: Apr 2003
Ort: Plauen
Beiträge: 586
indy eine Nachricht über ICQ schicken
Gucke mal unter /var/db/mysql

Sind Deine Datenbanken dort noch da?

Gruss...

Der Indy
__________________
Programmieren ohne Programmierer:

http://www.genesez.de/
indy ist offline   Mit Zitat antworten
Alt 23.06.2004, 11:41   #3
Rabadag
Registered User
 
Benutzerbild von Rabadag
 
Registrierungsdatum: Apr 2004
Beiträge: 108
Rabadag eine Nachricht über ICQ schicken
Zitat:
Zitat von indy
Gucke mal unter /var/db/mysql

Sind Deine Datenbanken dort noch da?

Gruss...

Der Indy
Ja da sind noch alle db's da inkl. der mysql

Geändert von Rabadag (23.06.2004 um 11:48 Uhr).
Rabadag ist offline   Mit Zitat antworten
Alt 24.06.2004, 09:41   #4
Rabadag
Registered User
 
Benutzerbild von Rabadag
 
Registrierungsdatum: Apr 2004
Beiträge: 108
Rabadag eine Nachricht über ICQ schicken
mysql update 4.1.1_1 nach 4.1.2

Erstmal vilen Dank an Indy das du mir per ICQ echt geholfen hast mein Problehm
in den griff zu bekommen.

Damit nun alle was davon haben sovern das Problehm auch auftaucht versuche ich eine kleine zusammenfassung zu erstellen.

Befor Ihr jedoch ein mysql update macht empfehle ich mittels mysqldump die einzelnen db's inkl. der mysql db zu sichern.


Sitwation:
Nach einem ubdate mit
portupgrade -r mysql-4.1.1_1
portupgrade -aC
portupgrade -aRr

und folgende fehler im mysql entstehen.

1. Keine anmeldung an mysql mit root möglich sowie auch alle db user.
Der mysql server kann weder gestopt noch gestartet werden.
Ein dump zu importieren schlägt ebenfalss fehl.


#mysql -uroot -ppassword mysql
Access denied for user: 'root@localhost' (Using password: YES)

#mysql -uroot

Eingelogt als anonymous aber ohne irgeneine berechtigung also ein wechsel zur db mysql mit \u mysql hat zur folge
Access denied for user: 'root@localhost' (Using password: NO)

2. Passwordänderung mittels mysqladmin
Ist ein Password änderung auch nicht möglich so ist die
privileg db sowie die user db futsh.

3. ein dump importiren mittels
mysql -uroot -ppassword mysql < datenfile.sql
Access denied for user: 'root@localhost' (Using password: YES)


#nun zur etwas unconvenzionelen lösung.

1. Den mysql server beenden. Geht dies nicht dan mit

#killall mysqld
oder mit
#kill /var/db/mysql/hosname.pid


2. Datenbank mysql mittels
#mv /var/db/mysql /var/db/mysql-back
umbenennen oder mit rm -R löschen.

3. Script für das erstellen der mysql Grand Tables ausführen.
#/usr/bin/mysql_install_db

Damit wird eine neue struckture in /var/db/mysql/mysql angelegt.

4. Nach dem erstellen der neuen db ist es michtig das die erstellten daten
dem mysql user gehören, also machen wir ein

#chown -R mysql:mysql /var/db/mysql/mysql

5. So nun sollte der mysql server neu gestartet werden und danach hat mann
wider follen zugriff auf die mysql db mit null password.


6.

#mysql -uroot mysql

somit ist es nun auch wieder möglich ein dump der mysql db
mit den user rechten zu importiren.



Gruss Rabadag
__________________
Auf der Verpackung Stand Win98,200,Xp,Vista oder Besser.
Deshalb verwende ich BSD.
-------------------------------
Rabadag ist offline   Mit Zitat antworten
Alt 24.06.2004, 10:41   #5
unlink
Registered User
 
Benutzerbild von unlink
 
Registrierungsdatum: Jan 2004
Ort: /dev/null
Beiträge: 260
Falls nur das Passwort verloren gegangen ist, sollte auch Folgendes helfen:
Code:
http://dev.mysql.com/doc/mysql/en/Re...rmissions.html In a Unix environment, the procedure for resetting the root password is as follows: 1. Log on to your system as either the Unix root user or as the same user that the mysqld server runs as. 2. Locate the `.pid' file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are `/var/lib/mysql/', `/var/run/mysqld/', and `/usr/local/mysql/data/'. Generally, the filename has the extension of `.pid' and begins with either `mysqld' or your system's hostname. Now you can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the `.pid' file in the following command: shell> kill `cat /mysql-data-directory/host_name.pid` Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command. 3. Restart the MySQL server with the special --skip-grant-tables option: shell> mysqld_safe --skip-grant-tables & 4. Set a new password for the root@localhost MySQL account: shell> mysqladmin -u root flush-privileges password "newpwd" Replace ``newpwd'' with the actual root password that you want to use. 5. You should now be able to connect using the new password. Alternatively, on any platform, you can set the new password using the mysql client: 1. Stop mysqld and restart it with the --skip-grant-tables option as described earlier. 2. Connect to the mysqld server with this command: shell> mysql -u root 3. Issue the following statements in the mysql client: mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd') -> WHERE User='root'; mysql> FLUSH PRIVILEGES; Replace ``newpwd'' with the actual root password that you want to use. 4. You should now be able to connect using the new password.
unlink ist offline   Mit Zitat antworten
Alt 24.06.2004, 11:47   #6
Rabadag
Registered User
 
Benutzerbild von Rabadag
 
Registrierungsdatum: Apr 2004
Beiträge: 108
Rabadag eine Nachricht über ICQ schicken
Ja klar das ist ne möglichkeit sovern die daten in der mysql noch vorhanden sind.

Bei meinem fall war nichts mehr in den tabellen, keine user keine berechtigungen.
__________________
Auf der Verpackung Stand Win98,200,Xp,Vista oder Besser.
Deshalb verwende ich BSD.
-------------------------------
Rabadag ist offline   Mit Zitat antworten
Antwort


Dieses Thema betrachten zurzeit 1 Personen. (0 registrierte Benutzer und 1 Gäste)
 
Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist An.
Smileys sind An
[IMG] Code ist An
HTML-Code ist Aus
Gehe zu

Ähnliche Themen
Thema Erstellt von Forum Antworten Letzter Beitrag
UPDATE 15.6.04: BSD Bücher - Eine kleine Rezension asg FreeBSD - Allgemein 82 30.05.2007 02:42
Hilfe! Partition voll - kann mich nicht mehr einloggen Windhund FreeBSD - Installation 21 22.11.2006 11:45
FreeBSD Samba PDC Howto Highfish Howtos 103 25.09.2006 21:14
XServer geht nicht mehr ... Windhund FreeBSD - Allgemein 3 14.05.2004 14:20
Spamassassin geht nach dem Update nicht creasot FreeBSD - Anwendungen und Ports 1 09.02.2004 17:09


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:07 Uhr.


Powered by vBulletin (Deutsch)
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.