atul_raj@nobara-pc:~$ sudo dnf install mariadb-server mariadb-devel -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
[sudo] password for atul_raj:
Updating and loading repositories:
Repositories loaded.
Package "mariadb-server-3:10.11.11-1.fc41.x86_64" is already installed.
Package Arch Version Repository Size
Upgrading:
mariadb-connector-c x86_64 3.4.4-2.fc42 nobara 516.2 KiB
replacing mariadb-connector-c x86_64 3.3.10-1.fc41 nobara 529.2 KiB
Installing:
mariadb-devel x86_64 3:10.11.11-6.fc42 nobara 5.8 MiB
Installing dependencies:
mariadb-connector-c-devel x86_64 3.4.4-2.fc42 nobara 191.7 KiB
Installing weak dependencies:
mariadb-connector-c-doc noarch 3.4.4-2.fc42 nobara 72.9 KiB
Transaction Summary:
Installing: 3 packages
Upgrading: 1 package
Replacing: 1 package
Total size of inbound packages is 2 MiB. Need to download 2 MiB.
After this operation, 6 MiB extra will be used (install 7 MiB, remove 529 KiB).
[1/4] mariadb-connector-c-doc-0:3.4.4-2.fc42 100% | 86.6 KiB/s | 117.8 KiB | 00m01s
[2/4] mariadb-connector-c-devel-0:3.4.4-2.fc 100% | 41.7 KiB/s | 57.0 KiB | 00m01s
[3/4] mariadb-devel-3:10.11.11-6.fc42.x86_64 100% | 818.8 KiB/s | 1.1 MiB | 00m01s
[4/4] mariadb-connector-c-0:3.4.4-2.fc42.x86 100% | 223.0 KiB/s | 208.0 KiB | 00m01s
-------------------------------------------------------------------------------------
[4/4] Total 100% | 493.3 KiB/s | 1.5 MiB | 00m03s
Running transaction
[1/7] Verify package files 100% | 1.0 KiB/s | 4.0 B | 00m00s
[2/7] Prepare transaction 100% | 11.0 B/s | 5.0 B | 00m00s
[3/7] Upgrading mariadb-connector-c-0:3.4.4- 100% | 30.0 MiB/s | 521.9 KiB | 00m00s
[4/7] Installing mariadb-connector-c-devel-0 100% | 11.3 MiB/s | 196.0 KiB | 00m00s
[5/7] Installing mariadb-devel-3:10.11.11-6. 100% | 136.2 MiB/s | 5.9 MiB | 00m00s
[6/7] Installing mariadb-connector-c-doc-0:3 100% | 3.1 MiB/s | 91.7 KiB | 00m00s
[7/7] Removing mariadb-connector-c-0:3.3.10- 100% | 48.0 B/s | 34.0 B | 00m01s
Complete!
Created symlink '/etc/systemd/system/mysql.service' → '/usr/lib/systemd/system/mariadb.service'.
Created symlink '/etc/systemd/system/mysqld.service' → '/usr/lib/systemd/system/mariadb.service'.
Created symlink '/etc/systemd/system/multi-user.target.wants/mariadb.service' → '/usr/lib/systemd/system/mariadb.service'.
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
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
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] n
... skipping.
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n
... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Error:
Enter current password for root (enter for none):
ERROR 1045(28000): Access denied for user 'root'@'localhost'(using password: NO)
$ mysql -u root
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead