Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste Überarbeitung Beide Seiten der Revision | ||
mysql [2010/05/04 00:32] 127.0.0.1 Externe Bearbeitung |
mysql [2011/06/05 17:13] admin |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== MySQL ====== | ====== MySQL ====== | ||
+ | [[http://olex.openlogic.com/wazi/2011/get-the-most-out-of-phpmyadmins-visual-query-designer/|phpMyAdmin’s Visual Query Designer]] \\ | ||
+ | [[http://www.bullzip.com/products/a2m/info.php|MS ACCESS to MySQL]] \\ | ||
+ | [[http://www.webcheatsheet.com/SQL/mysql_backup_restore.php#phpmyadmin|Backing Up and Restoring using phpMyAdmin]] \\ | ||
- | ==== Backing Up and Restoring using PHPMyAdmin ==== | + | ==== root Passwort von MySQL vergessen ==== |
- | *[[http://www.webcheatsheet.com/SQL/mysql_backup_restore.php#phpmyadmin|Backing Up and Restoring using PHPMyAdmin]] | + | *http://www.novell.com/communities/node/6055 |
+ | *http://www.suseblog.com/reset-mysql-root-password-in-linux | ||
+ | rcmysql stop | ||
- | ====Table is marked as crashed and should be repaired==== | + | mysqld_safe --skip-grant-tables |
- | *[[http://www.webcheatsheet.com/SQL/mysql_backup_restore.php|Back Up and Restore a MySQL Database]] | + | |
- | *[[http://blog.emeidi.com/2007/09/mysql-table-is-marked-as-crashed-and.html|Table is marked as crashed and should be repaired]] | + | |
+ | mysql --user=root mysql | ||
- | *In das Datenbankverzeichnis einstein:/var/lib/mysql/avanger wechseln und folgenden Befehl ausführen | + | update user set Password=PASSWORD('new-password') where user='root'; flush privileges; exit; |
- | *myisamchk -r mitglieder.MYI | + | |
- | *[[http://linux.die.net/man/1/mysqlcheck|mysqlcheck]] | + | |
- | *mysqlcheck -A -r -p | + | |
- | *[[A quick note on MySQL troubleshooting and MySQL replication recovery]] | + | killall mysqld_safe |
- | ==== root Passwort von MySQL vergessen ==== | + | rcmysql start |
- | <file> | ||
- | First things first. Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords. | ||
- | |||
- | mysqld_safe –skip-grant-tables | ||
- | |||
- | You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password. | ||
- | |||
- | mysql –user=root mysql | ||
- | |||
- | update user set Password=PASSWORD(’new-password’) where user=’root’; | ||
- | flush privileges; | ||
- | exit; | ||
- | |||
- | Now kill your running mysqld, then restart it normally. You should be good to go. Try not to forget your password again. | ||
- | </file> | ||
==== Joomla admin Passwort ändern ==== | ==== Joomla admin Passwort ändern ==== | ||
mysql -u root -pmyschool -e "UPDATE jos_users SET password=MD5('password') WHERE username='admin';" | mysql -u root -pmyschool -e "UPDATE jos_users SET password=MD5('password') WHERE username='admin';" | ||
- | ===MySQL Datenbank überprüfen === | + | ====MySQL Datenbank überprüfen ==== |
mysqlcheck --check [Datenbankname] -p | mysqlcheck --check [Datenbankname] -p | ||
+ | |||
mysqlcheck -A -p für alle | mysqlcheck -A -p für alle | ||
- | ===MySQL Datenbank versuchen zu reparieren === | + | ====MySQL Datenbank versuchen zu reparieren ==== |
mysqlcheck --repair [Datenbankname.Tabellenname] -p | mysqlcheck --repair [Datenbankname.Tabellenname] -p | ||
+ | |||
mysqlcheck -A --repair -p (für alle!) | mysqlcheck -A --repair -p (für alle!) | ||
- | ===Diverse Fehler === | + | ====Table is marked as crashed and should be repaired==== |
- | *Table is marked as crashed and should be repaired | + | *[[http://www.webcheatsheet.com/SQL/mysql_backup_restore.php|Back Up and Restore a MySQL Database]] |
- | *In das Datenbankverzeichnis einstein:/var/lib/mysql/avanger wechseln und folgenden Befehl ausführen | + | *[[http://blog.emeidi.com/2007/09/mysql-table-is-marked-as-crashed-and.html|Table is marked as crashed and should be repaired]] |
+ | *[[http://linux.die.net/man/1/mysqlcheck|mysqlcheck]] | ||
+ | |||
+ | *In das Datenbankverzeichnis einstein:/var/lib/mysql/avanger wechseln und folgenden Befehl ausführen | ||
myisamchk -r mitglieder.MYI | myisamchk -r mitglieder.MYI | ||
- | ===Resetting MySQL Root Password=== | + | mysqlcheck -A -r -p |
- | *http://www.novell.com/communities/node/6055 | + | |
- | *http://www.suseblog.com/reset-mysql-root-password-in-linux | + | *[[A quick note on MySQL troubleshooting and MySQL replication recovery]] |
+ | |||
+ | ==== Datenbank sichern und zurückschreiben ==== | ||
+ | |||
+ | *backup: | ||
+ | |||
+ | mysqldump datenbankname > daten.sql -ubenutzername -p | ||
+ | |||
+ | *restore: | ||
+ | mysqldump datenbankname < daten.sql -ubenutzername -p |