This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

MySQL-Einrichtung für OpenSim auf meinem 20.1 Ubuntu Server
#1
Meine MySQL-Einrichtung für OpenSim auf 20.4 Ubuntu Server


   


sudo apt update

sudo apt install mysql-server

Um MySQL etwas sicherer zu machen, lohnt die mysql_secure_installation

  1. root-login verbieten
  2. Test-Datenbank entfernen
  3. passwd für root vergeben

Anweisung:

sudo mysql_secure_installation

Abfragen durchlaufen und mit y bestätigen.

In meiner Umgebung hat das caching_sha2_password mit OpenSim Probleme gemacht.

Deshalb nutze ich für OpenSim immer das mysql_native_password. Soll aber jeder machen was er mag.

Für root natürlich dascaching_sha2_password.

Das Authentifizierungsverfahren für MySQL prüfen:

SELECT user,authentication_string,plugin,host FROM mysql.user;

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '5UhtgBGZsh+.';

FLUSH PRIVILEGES;

Nochmal prüfen ob root nicht mehr über das auth_socket-Plugin funktioniert:

SELECT user,authentication_string,plugin,host FROM mysql.user;

Testen, ob man sich einfach einloggen kann:

salamihot@pfeffer:~$ sudo mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Super, jetzt NEU anmelden mit:

mysql -u root -p

Benutzer erstellen und Passwort vergeben:

CREATE USER 'eisenbieger'@'localhost' IDENTIFIED BY 'uhz8f5FS25sRGZ4+$sgb';

Rechtevergabe:

GRANT ALL PRIVILEGES ON *.* TO 'eisenbieger'@'localhost' WITH GRANT OPTION;

Das war nicht ganz richtig, also nochmal:

ALTER USER 'eisenbieger'@'localhost' IDENTIFIED WITH mysql_native_password BY '7Uhuhn$#45BGZsh+.';

FLUSH PRIVILEGES;

Welche aktuellen Berechtigungen habe ich nun?

SHOW GRANTS FOR 'eisenbieger'@'localhost';

Datenbanken anlegen:

mysql> create database amiezemiez1;

Query OK, 1 row affected (0.39 sec)

mysql> create database amiezemiez2;

Query OK, 1 row affected (0.16 sec)

mysql> create database amiezemiez3;

Query OK, 1 row affected (0.15 sec)

mysql> create database amiezemiez4;

Query OK, 1 row affected (0.15 sec)

mysql> create database amiezemiez5;

Query OK, 1 row affected (0.13 sec)

mysql> exit

Natürlich könnte man auch mit 'use' in jede Datenbank wechseln. Dann einem Benutzer auch nur die Rechte an dieser Datenbank geben.

Man kann es auch übertreiben.

[DatabaseService]
    ;
    ; ### Choose the DB
    ;

    ; SQLite
    ;Include-Storage = "config-include/storage/SQLiteStandalone.ini";

    ; MySql
    ; Uncomment these lines if you want to use mysql storage
    ; Change the connection string to your db details
    StorageProvider = "OpenSim.Data.MySQL.dll"
    ConnectionString = "Data Source=localhost;Database=amiezemiez1;User ID=eisenbieger;Password=7Uhuhn$#45BGZsh+.;Old Guids=true;"
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste