MySQL installieren (Linux): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
K (Martin Kirner verschob die Seite MySQL installieren nach MySQL installieren (Linux))
Zeile 27: Zeile 27:


==== Installieren ====
==== Installieren ====
===== PPA =====
<pre>
sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt-get update
sudo apt-get install phpmyadmin
</pre>
===== Tar-Ball =====


Aktuellen Downloadpfad unter  [https://www.phpmyadmin.net/downloads/ https://www.phpmyadmin.net/downloads/] nachschauen.
Aktuellen Downloadpfad unter  [https://www.phpmyadmin.net/downloads/ https://www.phpmyadmin.net/downloads/] nachschauen.

Version vom 27. Juni 2017, 14:46 Uhr

Installation

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

Netzwerkzugriff

Um auch von einem anderem Rechner auf die Datenbank zugreifen zu können, muss noch in /etc/mysql/my.cnf die IP-Adresse der Netzwerkschnittstelle eingestellt werden:

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = <static IP address>

Werkzeuge

phpMyAdmin

Voraussetzung ist ein Apache-Webserver (siehe dazu Apache)

Installieren

PPA
sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt-get update
sudo apt-get install phpmyadmin
Tar-Ball

Aktuellen Downloadpfad unter https://www.phpmyadmin.net/downloads/ nachschauen.

wget https://files.phpmyadmin.net/phpMyAdmin/4.5.5.1/phpMyAdmin-4.5.5.1-all-languages.tar.gz
tar -xzvf phpMyAdmin-*.*.*.*.tar.gz
sudo mv phpMyAdmin-4.5.5.1-all-languages/ /var/www/phpmyadmin
sudo chown -R www-data:www-data /var/www/phpmyadmin/

Konfigurieren Apache

Konfigurationsdatei /etc/apache2/conf-available/phpmyadmin.conf anlegen:

sudo touch /etc/apache2/conf-available/phpmyadmin.conf

Und folgenden Inhalt einfügen:

Alias /phpmyadmin "/var/www/phpmyadmin/"
<Directory "/var/www/phpmyadmin">
    Options +FollowSymLinks
    AllowOverride All

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

    SetEnv HOME /var/www/phpmyadmin
    SetEnv HTTP_HOME /var/www/phpmyadmin
</Directory>

Konfiguration aktivieren:

cd /etc/apache2/conf-available/
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload

Konfiguration phpMyAdmin

cd /var/www/phpmyadmin/
sudo cp config.sample.inc.php config.inc.php
sudo chown www-data:www-data config.inc.php

In der Datei config.inc.php genügt es fürs Erste folgende Zeile anzupassen:

$cfg['blowfish_secret'] = 'a8b7c6d';


Zurück zu Ubuntu