How To Install MySQL On Oracle Linux 8.8
To Install MySQL On Oracle Linux 8.8
Introduction
MySQL is a relational database management system (RDBMS) developed by Oracle that is based on structured query language (SQL) that provides numerous Unix utilities in a single executable file.
Installation steps :
Step 1: Check the version of the OS by using the below command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.8"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:8:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.8
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.8
Step 2: Install the MySQL packages by using the below command.
[root@linuxhelp ~]# yum install mysql-server
Last metadata expiration check: 0:38:41 ago on Saturday 24 June 2023 11:26:39 PM IST.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql-server x86_64 8.0.32-1.module+el8.8.0+21055+76bd398b ol8_appstream 32 M
Installing dependencies:
mariadb-connector-c-config
noarch 3.1.11-2.el8_3 ol8_appstream 15 k
mecab x86_64 0.996-2.module+el8.8.0+21055+76bd398b ol8_appstream 394 k
mysql x86_64 8.0.32-1.module+el8.8.0+21055+76bd398b ol8_appstream 15 M
mysql-common x86_64 8.0.32-1.module+el8.8.0+21055+76bd398b ol8_appstream 137 k
mysql-errmsg x86_64 8.0.32-1.module+el8.8.0+21055+76bd398b ol8_appstream 629 k
protobuf-lite
x86_64 3.5.0-15.el8 ol8_appstream 149 k
Enabling module streams:
mysql 8.0
Transaction Summary
================================================================================
Install 7 Packages
Total download size: 48 M
Installed size: 245 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): mariadb-connector-c-config-3.1.11-2.el8_ 112 kB/s | 15 kB 00:00
(2/7): mysql-common-8.0.32-1.module+el8.8.0+210 1.9 MB/s | 137 kB 00:00
(3/7): mecab-0.996-2.module+el8.8.0+21055+76bd3 1.8 MB/s | 394 kB 00:00
(4/7): mysql-errmsg-8.0.32-1.module+el8.8.0+210 1.8 MB/s | 629 kB 00:00
(5/7): protobuf-lite-3.5.0-15.el8.x86_64.rpm 1.6 MB/s | 149 kB 00:00
(6/7): mysql-8.0.32-1.module+el8.8.0+21055+76bd 6.8 MB/s | 15 MB 00:02
(7/7): mysql-server-8.0.32-1.module+el8.8.0+210 6.4 MB/s | 32 MB 00:05
--------------------------------------------------------------------------------
Total 9.2 MB/s | 48 MB 00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mariadb-connector-c-config-3.1.11-2.el8_3.noarch 1/7
Installing : mysql-common-8.0.32-1.module+el8.8.0+21055+76bd398b. 2/7
Installing : mysql-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64 3/7
Installing : mysql-errmsg-8.0.32-1.module+el8.8.0+21055+76bd398b. 4/7
Installing : protobuf-lite-3.5.0-15.el8.x86_64 5/7
Installing : mecab-0.996-2.module+el8.8.0+21055+76bd398b.x86_64 6/7
Running scriptlet: mecab-0.996-2.module+el8.8.0+21055+76bd398b.x86_64 6/7
Running scriptlet: mysql-server-8.0.32-1.module+el8.8.0+21055+76bd398b. 7/7
Installing : mysql-server-8.0.32-1.module+el8.8.0+21055+76bd398b. 7/7
Running scriptlet: mysql-server-8.0.32-1.module+el8.8.0+21055+76bd398b. 7/7
ValueError: File context for /var/log/mysql(/.*)? already defined
Verifying : mariadb-connector-c-config-3.1.11-2.el8_3.noarch 1/7
Verifying : mecab-0.996-2.module+el8.8.0+21055+76bd398b.x86_64 2/7
Verifying : mysql-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64 3/7
Verifying : mysql-common-8.0.32-1.module+el8.8.0+21055+76bd398b. 4/7
Verifying : mysql-errmsg-8.0.32-1.module+el8.8.0+21055+76bd398b. 5/7
Verifying : mysql-server-8.0.32-1.module+el8.8.0+21055+76bd398b. 6/7
Verifying : protobuf-lite-3.5.0-15.el8.x86_64 7/7
Installed:
mariadb-connector-c-config-3.1.11-2.el8_3.noarch
mecab-0.996-2.module+el8.8.0+21055+76bd398b.x86_64
mysql-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64
mysql-common-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64
mysql-errmsg-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64
mysql-server-8.0.32-1.module+el8.8.0+21055+76bd398b.x86_64
protobuf-lite-3.5.0-15.el8.x86_64
Complete!
Step 3: Start the MySQL service by using the below command
root@linuxhelp ~]# systemctl start mysqld.service
Step 4: Enable the MySQL service by using the below command
[root@linuxhelp ~]# systemctl enable mysqld.service
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
Step 5: Check the status of MySQL by using the below command
[root@linuxhelp ~]# systemctl status mysqld.service
● mysqld.service - MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor pres>
Active: active (running) since Sun 2023-06-25 00:07:22 IST; 33s ago
Main PID: 126761 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 22942)
Memory: 458.3M
CGroup: /system.slice/mysqld.service
└─126761 /usr/libexec/mysqld --basedir=/usr
Jun 25 00:07:12 linuxhelp systemd[1]: Starting MySQL 8.0 database server...
Jun 25 00:07:12 linuxhelp mysql-prepare-db-dir[126683]: Initializing MySQL data>
Jun 25 00:07:22 linuxhelp systemd[1]: Started MySQL 8.0 database server.
Step 6: Secure the MySQL installation by using the below command
[root@linuxhelp ~]# mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No: N
Please set the password for root here.
New password:
Re-enter new password:
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) : 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? (Press y|Y for Yes, any other key for No) : y
Success.
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.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
Step 7: Enter in to the MySQL by using the below command
[root@linuxhelp ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32 Source distribution
Copyright (c) 2000, 2023, 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>
Step 8: Create one database by using the below command
mysql> create database demo;
Query OK, 1 row affected (0.01 sec)
Step 9: Check whether the database is created or not by using the below command
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| demo |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.01 sec)
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps requiredto install MySQL on Oracle 8.8. Your feedback is much welcome.
Comments ( 0 )
No comments available