• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Install and Configure Mysql Server on Oracle Linux

  • 00:32 cat /etc/os-release
  • 00:47 yum install mysql-server
  • 01:38 systemctl start mysqld.service
  • 01:56 systemctl enable mysqld
  • 02:11 systemctl status mysqld.service
  • 02:33 mysql_secure_installation
  • 03:38 mysql -u root -p
  • 03:59 create database school;
6795

To Install and Configure Mysql Server on Oracle Linux

Introduction :

MySQL is a free and open-source relational database management system (RDBMS) that works on client/server and embedded systems. The MySQL Database Server is extremely fast, reliable, scalable, and easy to use.

Installation steps : Step 1 : check the version of the OS.

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

Step 2 : Install the mysql packages.

[root@linuxhelp ~]# yum install mysql-server
Last metadata expiration check: 0:06:08 ago on Monday 20 December 2021 11:59:35 AM IST.
Dependencies resolved.
============================================================================================================================================
 Package                               Architecture      Version                                             Repository                Size
============================================================================================================================================
Installing:
 mysql-server                          x86_64            8.0.26-1.module+el8.4.0+20311+30d12931              ol8_appstream             25 M
Installing dependencies:
 mariadb-connector-c-config            noarch            3.1.11-2.el8_3                                      ol8_appstream             15 k
 mecab                                 x86_64            0.996-1.module+el8.0.0+5253+1dce7bb2.9              ol8_appstream            397 k
 mysql                                 x86_64            8.0.26-1.module+el8.4.0+20311+30d12931              ol8_appstream             12 M
 mysql-common                          x86_64            8.0.26-1.module+el8.4.0+20311+30d12931              ol8_appstream            134 k
 mysql-errmsg                          x86_64            8.0.26-1.module+el8.4.0+20311+30d12931              ol8_appstream            598 k
 protobuf-lite                         x86_64            3.5.0-13.el8                                        ol8_appstream            149 k
Enabling module streams:
 mysql                                                   8.0                                                                               

Transaction Summary
============================================================================================================================================
Install  7 Packages

Total download size: 38 M
Installed size: 195 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): mariadb-connector-c-config-3.1.11-2.el8_3.noarch.rpm                                                  60 kB/s |  15 kB     00:00    
(2/7): mysql-common-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64.rpm                                       718 kB/s | 134 kB     00:00    
Total                                                                                                       6.7 MB/s |  38 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.26-1.module+el8.4.0+20311+30d12931.x86_64                                                         2/7 
  Installing       : mysql-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                                                                3/7 
  Installing       : mysql-errmsg-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                                                         4/7 
  Installing       : protobuf-lite-3.5.0-13.el8.x86_64                                                                                  5/7 
  Installing       : mecab-0.996-1.module+el8.0.0+5253+1dce7bb2.9.x86_64                                                                6/7 
  Running scriptlet: mecab-0.996-1.module+el8.0.0+5253+1dce7bb2.9.x86_64                                                                6/7 
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Running scriptlet: mysql-server-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                                                         7/7 
  Installing       : mysql-server-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                                                         7/7 
  Running scriptlet: mysql-server-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                                                         7/7 
ValueError: File context for /var/log/mysql(/.*)? already defined

/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored


Installed:
  mariadb-connector-c-config-3.1.11-2.el8_3.noarch                     mecab-0.996-1.module+el8.0.0+5253+1dce7bb2.9.x86_64                 
  mysql-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64                  mysql-common-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64          
  mysql-errmsg-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64           mysql-server-8.0.26-1.module+el8.4.0+20311+30d12931.x86_64          
  protobuf-lite-3.5.0-13.el8.x86_64                                   

Complete!

Step 3 : start the mysql service

root@linuxhelp ~]# systemctl start mysqld.service

step 4 : Enable the mysql service

[root@linuxhelp ~]# systemctl enable mysqld

Step 5 : check the status of mysql

[root@linuxhelp ~]# systemctl status mysqld.service 
● mysqld.service - MySQL 8.0 database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-12-20 12:24:56 IST; 15h ago
 Main PID: 11593 (mysqld)
   Status: "Server is operational"
    Tasks: 39 (limit: 24798)
   Memory: 464.4M
   CGroup: /system.slice/mysqld.service
           └─11593 /usr/libexec/mysqld --basedir=/usr

Dec 20 12:24:45 linuxhelp systemd[1]: Starting MySQL 8.0 database server...
Dec 20 12:24:45 linuxhelp mysql-prepare-db-dir[11513]: Initializing MySQL database
Dec 20 12:24:56 linuxhelp systemd[1]: Started MySQL 8.0 database server.
Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xe" for details.

Step 6 : secure the mysql installation

[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

Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

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.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

Step 7 : Enter in to the mysql

[root@linuxhelp ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.26 Source distribution

Copyright (c) 2000, 2021, 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> create database school;
Query OK, 1 row affected (0.01 sec)

With this process of Installation and Configuration MySQL server on oracle Linux comes to an end

Tags:
shanemichel
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Is it possible to reset Root passsword in Mysql?

A

yes, it possible to reset Root passsword in Mysql.

Q

Can we customize the data directory path in mysql?

A

yes we can change by editing the mysql configuration file.

Q

How to backup the table in a database?

A

To backup the table in a database use mysqldump -u root -p database_name table_name > filename.sql

Q

What is the current stable version of mysql?

A

The latest stable version of mysql is 8.0.27.

Q

What kind of Database is mysql?

A

Mysql is a relational database system.

Related Tutorials in How to Install and Configure Mysql Server on Oracle Linux

Related Tutorials in How to Install and Configure Mysql Server on Oracle Linux

How to remove MySQL package completely on Ubuntu 16.04
How to remove MySQL package completely on Ubuntu 16.04
Apr 17, 2017
How to install NagiosQL on CentOS
How to install NagiosQL on CentOS
Jun 3, 2017
How To Install Mysql-Workbench On Linux Mint 20.2
How To Install Mysql-Workbench On Linux Mint 20.2
Apr 27, 2022
How to configure MySQL Master-Master replication in CentOS 7
How to configure MySQL Master-Master replication in CentOS 7
Apr 17, 2017
How to install MySQL from source on CentOS 6
How to install MySQL from source on CentOS 6
Nov 23, 2017
How to Install MySQL 8 on Ubuntu 19.04
How to Install MySQL 8 on Ubuntu 19.04
Jun 18, 2019
How to Install and configure the Samba server on oracle linux
How to Install and configure the Samba server on oracle linux
Jun 16, 2022
How to install FTP server on oracle Linux
How to install FTP server on oracle Linux
May 17, 2022

Related Forums in How to Install and Configure Mysql Server on Oracle Linux

Related Forums in How to Install and Configure Mysql Server on Oracle Linux

MySQL
rolando class=
Mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode'': Table 'performance_schema.session_variables' doesn't exist (1146)
May 9, 2019
MySQL
isaiah class=
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
Feb 8, 2017
MySQL
liam class=
How to check mysql history in Linux
Aug 28, 2017
CentOS Web Panel
anettejoseph class=
Centos Web Panel : How to find mysql root password
Jan 30, 2018
Database
john class=
Warning: mysqli::__construct(): (HY000/2002): No route to host
May 23, 2017
MySQL
julian class=
ERROR 1881 (HY000) at line 43: Operation not allowed when innodb_forced_recovery > 0
Apr 22, 2017
MySQL
muhammad ahmad class=
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
May 9, 2019
MySQL
gabriel class=
ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50560, now running 50642
Dec 14, 2018

Related News in How to Install and Configure Mysql Server on Oracle Linux

Related News in How to Install and Configure Mysql Server on Oracle Linux

SQL sequel - worm rear its head after a decade
SQL sequel - worm rear its head after a decade
Feb 8, 2017
Nine Popular WordPress plugins affected with critical SQL injection vulnerabilities
Nine Popular WordPress plugins affected with critical SQL injection vulnerabilities
Sep 7, 2019
GandCrab Ransomware Infection Made by Scanning MySQL Databases
GandCrab Ransomware Infection Made by Scanning MySQL Databases
May 28, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Gibbson ?
How do i run both nginx and apache in same instance on centos

Hi...,

my server is based centos operating system and my webserver is already running on Apache.... i need to run both apache and nginx on same instance ... please help me to implement this concept...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.