MySQL installieren (Linux): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 24: Zeile 24:
# localhost which is more compatible and is not less secure.
# localhost which is more compatible and is not less secure.
bind-address            = <static IP address>
bind-address            = <static IP address>
</pre>
Um alle Netzwerke zuzulassen, die Adresse ''0.0.0.0'' verwenden:
<pre>
bind-address            = 0.0.0.0
</pre>
</pre>



Version vom 12. November 2018, 23:55 Uhr

Installation

sudo apt-get -y install mysql-server

Ubuntu-Server 16.04

sudo apt-get -y install php-mysql 

Ubuntu-Server 14.04

sudo apt-get -y install php5-mysql

Netzwerkzugriff

Um auch von einem anderem Rechner auf die Datenbank zugreifen zu können, muss noch die IP-Adresse der Netzwerkschnittstelle eingestellt werden.

Dazu in der Konfigurationsdatei folgende Zeile anpassen:

# 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>

Um alle Netzwerke zuzulassen, die Adresse 0.0.0.0 verwenden:

bind-address            = 0.0.0.0

Ubuntu-Server 16.04

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 

Ubuntu-Server 14.04

sudo vi /etc/mysql/my.cnf

Passwort

Passwort setzen

Unter Raspbian wird bei der Installation nicht nach einem root-Passwort gefragt.

Um es zu setzen, als root einloggen

sudo mysql -u root -p

und folgende Befehle ausführen:

grant all on *.* to root@localhost identified by '<password>' with grant option;
flush privileges;
quit;

Passwort zurücksetzen

https://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html

Werkzeuge

phpMyAdmin


Zurück zu Ubuntu