MySQL4Install
Hinweise
Diese Hilfe beschreibt die Installation von MYSQL4 (bzw. den Wechsel von MySQL3 auf MySQL4).
ACHTUNG! Nur für OVH-Release 1 (bzw. Redhat)!
Sie sollten darauf achten, dass die aktuelle Release installiert ist.
Erste Schritte
Backup
Zuerst erstellen wir ein Datenbackup für den Fall, dass Fehler auftreten. Dies wird im Notfall das sofortige Restaurieren aller Datenbanken, Rechte und User erlauben:
$ cp -rp /home/mysql/ /home/mysqlbackup
Passwort kontrollieren
Kontrollieren Sie das Rootpasswort auf seine Funktionalität:
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.58-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
Passwort- 'table' anpassen
MySQL3 und MySQL4 benutzen unterschiedliche Cryptsysteme -> die Passwörter von MySQL4 sind größer. Die 'table' für das Passwort muss also vergrössert werden:
$ /etc/init.d/mysql stop
$ safe_mysqld --skip-grant-tables &
mysql
use mysql
ALTER TABLE user CHANGE COLUMN Password Password char(60) not null;
exit
$ /etc/init.d/mysql stop
Installation
Alle Vorbereitungen zur Installation sind getroffen. Jetzt werden die alten MySQL-Quellpakete entfernt und die Paketquellen für MySQL4 herunter geladen:
MySQL entfernen
$ cd /home/ovh/src/soft
$ rm MySQL*
Download & Installation
Laden Sie die Paketquellen herunter:
Danach können diese installiert werden:
$ rpm -Uvh MySQL*
Achten Sie darauf, dass alle Pakete ordnungsgemäß entpackt werden (vor allem das devel-Paket bereitet manchmal Probleme).
Logfile anpassen
MySQL wird nun folgende Fehlermeldung ausgeben:
""070426 11:04:20
ERROR Could not use /var/log/mysql/slow-query.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.""
URSACHE: Die Logs können nicht geschrieben werden.
LÖSUNG: Modifizierung der Datei slow-query.log:
$ pico /var/log/mysql/slow-query.log
( eine Leerzeile hinzufügen und speichern )
$ chown mysql:root /var/log/mysql/slow-query.log
Wenn MySQL jetzt neu gestartet wird, scheint alles OK zu sein:
$ /etc/init.d/mysql stop
$ /etc/init.d/mysql start
$ cat /var/log/mysql/info.log
070426 11:04:56 mysqld started
070426 11:04:56
Warning Asked for 196608 thread stack, but got 126976
070426 11:04:56 InnoDB: Started; log sequence number 0 43634
/usr/sbin/mysqld: ready for connections.
Version: '4.1.13-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 0 MySQL Community Edition - Standard (GPL)
Root-Passwort setzen
Nun muss das Rootpasswort neu gesetzt werden:
$ /etc/init.d/mysql stop
$ safe_mysqld --skip-grant-tables &
mysql
use mysql
UPDATE user SET password=PASSWORD('PASSWORTVOMROOTMYSQL') where User="root" AND Host="localhost";
exit
$ /etc/init.d/mysql stop
$ /etc/init.d/mysql start
Nun müssen PHP und apache neu kompiliert werden:
Link zu PHP Kompilierung
Link zu apache-Kompilierung