# MySQL - MariaDB

## Datenbank mysql wiederherstellen

Quelle: [https://stackoverflow.com/questions/8911115/how-to-recover-recreate-mysqls-default-mysql-database](https://serverfault.com/questions/76784/mysql-recreate-default-mysql-database)

```
mysql_install_db

mysqld --initialize
```

## CREATE OR REPLACE USER

Quelle: [https://mariadb.com/kb/en/create-user/#or-replace](https://mariadb.com/kb/en/create-user/#or-replace)

## GRANT PRIVILEGES

Quelle: [https://phoenixnap.com/kb/how-to-create-mariadb-user-grant-privileges](https://phoenixnap.com/kb/how-to-create-mariadb-user-grant-privileges)

## Password with special characters

Quelle: [https://www.tutorialspoint.com/set-special-characters-for-password-while-creating-a-new-mysql-user](https://www.tutorialspoint.com/set-special-characters-for-password-while-creating-a-new-mysql-user)

```
create user 'yourUserName'@'yourHostName' identified by 'yourSpecialCharacterPassword';
```