Metainformationen zur Seite
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
start:linux:ubuntu:mariadb [2020/05/18 22:28] wikiadmin [Installation Prozess] |
start:linux:ubuntu:mariadb [2020/06/01 22:52] (aktuell) wikiadmin [Nützliche MySQL Befehle] |
||
---|---|---|---|
Zeile 35: | Zeile 35: | ||
---- | ---- | ||
+ | |||
+ | After starting command mysql_secure_installation you see follow menu points. | ||
+ | |||
'' | '' | ||
In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, and you haven’t set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): | In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, and you haven’t set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): | ||
Zeile 87: | Zeile 90: | ||
Thanks for using MariaDB! | Thanks for using MariaDB! | ||
'' | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | To check the MariaDB version: | ||
<code C# [enable_line_numbers=" | <code C# [enable_line_numbers=" | ||
+ | mysql -v | ||
+ | </ | ||
+ | |||
+ | To connect to the MariaDB console: | ||
+ | |||
+ | <code C# [enable_line_numbers=" | ||
+ | mysql -u root -p | ||
+ | </ | ||
+ | |||
+ | To see what we can do with MariaDB: | ||
+ | |||
+ | <code C# [enable_line_numbers=" | ||
+ | MariaDB [(none)]> | ||
</ | </ | ||
---- | ---- | ||
- | To check the MariaDB | + | ===== Einige nützliche Befehle ===== |
+ | |||
+ | <code C# [enable_line_numbers=" | ||
+ | //Datenbank stoppen, starten, restart, status anzeigen | ||
+ | sudo service mysql stop | ||
+ | sudo service mysql start | ||
+ | sudo service mysql restart | ||
+ | sudo service mysql status | ||
+ | |||
+ | // | ||
+ | mysqld_safe --skip-grant-tables --skip-networking & | ||
+ | |||
+ | //Per MySQL-Konsole mit Datenbank mysql verbinden | ||
+ | mysql -u admin mysql | ||
+ | |||
+ | //Neues Passwort setzen | ||
+ | UPDATE user SET password=PASSWORD(" | ||
+ | |||
+ | // | ||
+ | MariaDB | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Nützliche MySQL Befehle ===== | ||
+ | Alle Angaben gehen davon aus, dass der Login in die (MariaDB) MySQL-Server bereits erfolgt ist und root Rechte besitzt. | ||
+ | |||
+ | <code C# [enable_line_numbers=" | ||
+ | // neue Datenbank erstellen | ||
+ | MariaDB> create datenbankname | ||
+ | </ | ||
+ | ---- |