[kabir@fedora ~]$ sudo rpm -e --nodeps mysql-community-libs mysql-community-common mysql-community-server
[sudo] password for kabir:
Removed “/etc/systemd/system/multi-user.target.wants/mysqld.service”.
[kabir@fedora ~]$ msql
bash: msql: command not found…
[kabir@fedora ~]$ sudo dnf remove mysql-community-client
[sudo] password for kabir:
Dependencies resolved.
Package Architecture Version Repository Size
Removing:
mysql-community-client x86_64 8.0.31-10.fc37 @mysql80-community 73 M
Removing dependent packages:
mysqltuner noarch 1.8.3-3.git.1333ea9.fc37 @fedora 297 k
Removing unused dependencies:
mysql-community-client-plugins x86_64 8.0.31-10.fc37 @mysql80-community 6.9 M
Transaction Summary
Remove 3 Packages
Freed space: 80 M
Is this ok [y/N]: y
[kabir@fedora ~]$ sudo dnf install mariadb-server
Last metadata expiration check: 2:49:01 ago on Tuesday 10 January 2023 12:44:19 PM.
Dependencies resolved.
Package Architecture Version Repository Size
Installing:
mysql-community-server x86_64 8.0.31-10.fc37 mysql80-community 20 M
Installing dependencies:
mysql-community-client x86_64 8.0.31-10.fc37 mysql80-community 4.2 M
mysql-community-client-plugins x86_64 8.0.31-10.fc37 mysql80-community 1.3 M
mysql-community-common x86_64 8.0.31-10.fc37 mysql80-community 537 k
mysql-community-libs x86_64 8.0.31-10.fc37 mysql80-community 1.5 M
Transaction Summary
Install 5 Packages
Total download size: 28 M
Installed size: 208 M
Is this ok [y/N]: y
[kabir@fedora ~]$ sudo systemctl enable mysqld
[kabir@fedora ~]$ sudo systemctl status mysqld
○ mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: disabled)
Active: inactive (dead) since Tue 2023-01-10 15:28:54 IST; 10min ago
Duration: 3h 5min 32.331s
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Main PID: 1340 (code=exited, status=0/SUCCESS)
Status: “Server shutdown complete”
CPU: 45.488s
Jan 10 12:23:16 fedora systemd[1]: Starting mysqld.service - MySQL Server…
Jan 10 12:23:21 fedora systemd[1]: Started mysqld.service - MySQL Server.
Jan 10 15:28:53 fedora systemd[1]: Stopping mysqld.service - MySQL Server…
Jan 10 15:28:54 fedora systemd[1]: mysqld.service: Deactivated successfully.
Jan 10 15:28:54 fedora systemd[1]: Stopped mysqld.service - MySQL Server.
Jan 10 15:28:54 fedora systemd[1]: mysqld.service: Consumed 45.488s CPU time.
[kabir@fedora ~]$ sudo systemctl start mysqld
[kabir@fedora ~]$ sudo systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: disabled)
Active: active (running) since Tue 2023-01-10 15:39:29 IST; 3s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 53538 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 53566 (mysqld)
Status: “Server is operational”
Tasks: 39 (limit: 9346)
Memory: 508.2M
CPU: 2.353s
CGroup: /system.slice/mysqld.service
└─53566 /usr/sbin/mysqld
[kabir@fedora ~]$ sudo grep ‘temporary password’ /var/log/mysqld.log
2023-01-08T15:46:32.266693Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: *********
[kabir@fedora ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.31
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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> quit
Bye
[kabir@fedora ~]$ sudo mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
The ‘validate_password’ component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y
{Change your root password configure the installation…}
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL 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? (Press y|Y for Yes, any other key for No) : n
… skipping.
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? (Press y|Y for Yes, any other key for No) : n
… skipping.
By default, MySQL 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? (Press y|Y for Yes, any other key for No) : n
… skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : n
… skipping.
All done!
[kabir@fedora ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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> quit
Bye
Its working Now Thanks!