mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-25 13:44:51 +00:00
80 lines
1.8 KiB
Text
80 lines
1.8 KiB
Text
|
[id='install-from-fedora-main-repo']
|
||
|
= Install from Fedora Main Repo
|
||
|
|
||
|
The community provide a MySql package in the main repo.
|
||
|
|
||
|
----
|
||
|
sudo dnf install {community-mysql-server|mariadb-server}
|
||
|
----
|
||
|
|
||
|
== Configuring MySql/MariaDB
|
||
|
|
||
|
Enable the service at boot and start:
|
||
|
|
||
|
----
|
||
|
sudo systemctl enable {mysqld|mariadb}
|
||
|
sudo systemctl start {mysqld|mariadb}
|
||
|
----
|
||
|
|
||
|
== Installing MariaDB server from the Fedora Modular repository
|
||
|
|
||
|
To list the available versions (_streams_ in modularity terminology) of MariaDB:
|
||
|
|
||
|
----
|
||
|
dnf module list mariadb
|
||
|
----
|
||
|
|
||
|
To enable the version of MariaDB you want to use and make the stream RPMs available in the package set:
|
||
|
|
||
|
----
|
||
|
sudo dnf module enable mariadb:10.4
|
||
|
----
|
||
|
|
||
|
At this point you can verify that the available RPM provides the 10.4 verison of MariaDB server:
|
||
|
|
||
|
----
|
||
|
dnf list mariadb-server
|
||
|
----
|
||
|
|
||
|
To install mariadb server:
|
||
|
|
||
|
----
|
||
|
sudo dnf module install mariadb/server
|
||
|
----
|
||
|
|
||
|
With modules, you could also install a specific profile: like client, devel or galera (the multi-master replica).
|
||
|
For instance, if you don't want to install the server stuff, but only the client packages:
|
||
|
|
||
|
----
|
||
|
sudo dnf module install mariadb:10.4/client
|
||
|
----
|
||
|
|
||
|
* MariaDB default root password is empty.
|
||
|
* find Default Password, For security reasons, MySQL generates a temporary root key. Please
|
||
|
|
||
|
----
|
||
|
sudo grep 'temporary password' /var/log/mysqld.log
|
||
|
----
|
||
|
|
||
|
== Configuring SQL before the first use
|
||
|
|
||
|
----
|
||
|
sudo mysql_secure_installation
|
||
|
----
|
||
|
|
||
|
Some questions will be asked: answer to them as you prefer; answering _yes_ to all of them is perfectly fine.
|
||
|
|
||
|
== Using SQL
|
||
|
|
||
|
----
|
||
|
sudo mysql -u root -p
|
||
|
----
|
||
|
|
||
|
== Removing SQL
|
||
|
|
||
|
I suggest to remove in the following way:
|
||
|
|
||
|
----
|
||
|
sudo dnf remove {community-mysql-server|mariadb-server}
|
||
|
----
|