Siden Fedora 19 har MariaDB været standard på Fedora. Dvs. hvis du installerer pakken mysql-server, får du MariaDB.
For at få Oracle’s database server, skal du istedet installerer mysql-community-server:
1 |
# dnf install community-mysql-server |
Derefter starter du den:
1 |
# service mysqld start |
Ifølge denne MySQL guide skulle du nu finde en midlertidig root adgangskode i loggen:
1 |
# grep 'temporary password' /var/log/mysqld.log |
Til gengæld:
1 2 |
# grep 'password' /var/log/mysqld.log [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. |
Hmmm… mærkeligt. Der er noget der ikke helt stemmer med dokumentationen, men så laver vi da bare en adgangskode selv. I linie #2 trykker du bare enter:
1 2 3 4 |
# mysqladmin -u root -p password 'megetH3mmeligK0de' Enter password: mysqladmin: [Warning] Using a password on the command line interface can be insecure. Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety. |
… denne gang skriver du din nye kode i linie #2:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.7.18 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> |
Så er vi kørende 🙂