wiki8.blessen.de

Kreativität für die Realität

Benutzer-Werkzeuge

Webseiten-Werkzeuge


software:mysql

MySQL

MySQL 🇩🇪 ist eine leistungsfähige Datenbank-Serveranwendung. Die Firma MySQL AB, welche hinter der Entwicklung der Datenbank steht, wurde im Jahr 2008 von Sun übernommen und ist seit der Übernahme von Sun durch Oracle nun dieser Firma zugehörig. MySQL ist neben Linux auch für Windows, MacOS, FreeBSD, Solaris und weitere Betriebssysteme verfügbar.

* https://hub.docker.com/_/mariadb/

Remote Access

MySQL 5.6 installieren

MySQL komplett deinstallieren

sudo apt-get purge mysqld-server 
sudo apt autoremove 
sudo dpkg -l | grep mariadb 
sudo systemctl stop mysqld
sudo systemctl stop nariadb
sudo apt purge mysql-server mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /var/lib/mysql/
sudo rm -rf /etc/mysql/
sudo rm -rf /var/log/mysql
sudo deluser --remove-home mysql
sudo delgroup mysql
sudo add-apt-repository --remove ppa:theppayouused/ppa

Datenbanken kopieren

# In das Verzeichnis /var/lib/mysql
sudo chown -R mysql:mysql /var/lib/mysql

Reset Root Passwort

All solutions I found were much more complex than necessary and none worked for me. Here is the solution that solved my problem. There isn't any need to restart mysqld or start it with special privileges.

sudo mysql
 
-- for MySQL
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
 
-- for MariaDB
ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('root');

With a single query we are changing the auth_plugin to mysql_native_password and setting the root password to root (feel free to change it in the query).

Now you should be able to log in with root. More information can be found in MySQL documentation or MariaDB documentation.

(Exit the MySQL console with Ctrl + D or by typing exit.)

Installation mysql-workbench

# Deinstallation
sudo apt remove mysql-workbench-community
software/mysql.txt · Zuletzt geändert: (Externe Bearbeitung)