×

Install MySQL Version 8 on Red Hat Enterprise Linux 8 - Step by Step Process ?

This article covers how to Install MySQL Version 8 on Red Hat Enterprise Linux 8. Now, you should now have a fully functioning MySQL server version 8 running on your Server.


To Install MySQL 8.0 On CentOS 8 / RHEL 8:

1. Install MySQL 8.0 from MySQL Dev Community

Add the official repository of MySQL to install the MySQL community server:

$ rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm

Make sure the MySQL repository has been added and enabled by using the following command:

$ yum repolist all | grep mysql | grep enabled


To Manage MySQL server Service on Linux:

1. After the installation of MySQL, start MySQL server service using the following command:

$ systemctl start mysqld

2. The below command will Enable MySQL server at system startup:

$ systemctl enable mysqld

3. Verify that MySQL server is started using the following command:

$ systemctl status mysqld


Backup and Restore MySQL Databases on Red Hat Enterprise Linux 8 - Step by Step Process ?

This article covers how to take Backups and restore a MySQL database on Red Hat Enterprise Linux 8.


Advantage of logical backup:

The main advantage of logical backup over physical backup is portability and flexibility. 

The data can be restored on other hardware configurations, MariaDB versions or Database Management System (DBMS), which is not possible with physical backups.

Note that physical backup must be performed when the mariadb.service is not running or all tables in the database are locked to prevent changes during the backup.


The mysqldump client is a backup utility, which can can be used to dump a database or a collection of databases for the purpose of a backup or transfer to another database server. 

The output of mysqldump typically consists of SQL statements to re-create the server table structure, populate it with data, or both. 

Alternatively, mysqldump can also generate files in other formats, including CSV or other delimited text formats, and XML.


Advantages of Physical backup:

1. Output is more compact.

2. Backup is smaller in size.

3. Backup and restore are faster.

4. Backup includes log and configuration files.


You can use one of the following MariaDB backup approaches to back up data from a MariaDB database:

1. Logical backup with mysqldump

2. Physical online backup using the Mariabackup tool

3. File system backup

4. Replication as a backup solution


To Backing up an entire database with mysqldump:

Execute the command:

# mysqldump [options] db_name > backup-file.sql


Using mysqldump to back up a set of tables from one database:

To back up a subset of tables from one database, add a list of the chosen tables at the end of the mysqldump command:

# mysqldump [options] db_name [tbl_name …​]



To restore the data while keeping the original backup files, use the following procedure:

1. Run the mariabackup command with the --copy-back option:

$ mariabackup --copy-back --target-dir=/var/mariadb/backup/

2. Fix the file permissions.

When restoring a database, Mariabackup preserves the file and directory privileges of the backup. However, Mariabackup writes the files to disk as the user and group restoring the database. 

For example, to recursively change ownership of the files to the mysql user and group:

# chown -R mysql:mysql /var/lib/mysql/

3. Start the mariadb service:

# systemctl start mariadb.service


Job for mariadb.service failed because the control process exited with error code - How to fix it ?

This article covers how to resolve the above maiadb problem "Job for mariadb.service failed because the control process exited with error code" which may arise during the installation of #MariaDB on #CentOS 8.

The /var/lib/mysql directory is not empty when MariaDB is installed, it contains e.g. the 'mysql' database and some other files. 

Recreating the folder, even with correct permissions, will not help you. 

Either MariaDB has not been successfully installed or the directory was removed. Reinstall MariaDB to get a working basic database system back.

Also, you can give access /var/log/mysql/* to mysql by running the command:

sudo chown mysql:mysql /var/log/mysql/*


MariaDB offers more and better storage engines, NoSQL support, provided by Cassandra, allows you to run SQL and NoSQL in a single database system. 

MariaDB also supports TokuDB, which can handle big data for large organizations and corporate users.


To view mysql error logs:

1. edit /etc/my.cnf [mysqld] log=/tmp/mysql.log.

2. restart the computer or the mysqld service service mysqld restart.

3. open phpmyadmin/any application that uses mysql/mysql console and run a query.

4. cat /tmp/mysql.log ( you should see the query )


Install MariaDB on CentOS 8 - Step by step process ?

This article will guide you on how to install MariaDB on your CentOS 8 system. Now you can create new databases and grant privileges to other database users. Also, you can add users and create new databases for web or desktop applications which will be written in PHP, Python, and so on.

In MariaDB replication is faster whereas in MySQL replication is slower. 

MariaDB is Open Source whereas MySQL uses some proprietary code in its Enterprise Edition. 

MariaDB doesn't support Data Masking and Dynamic column while MySQL supports it. Comparatively MariaDB is faster than MySQL.


To uninstall MariaDB and install mysql:

1. Purge mariadb sudo apt purge mariadb-* Remove all databases ('Yes' answer)

2. Purge mysql sudo apt purge mysql-*

3. Remove folders: sudo rm -r /usr/share/mysql/ sudo rm -r /etc/mysql/ sudo rm -r /lib/systemd/system/mysql.service.

4. Now you can try to install oracle mysql: sudo apt install mysql-server.


MariaDB on Debian 10 - Step by step process to install it ?

This article will guide you on the different methods to conveniently install and start the MariaDB service on a Debian 10 system. Also, we dealt with how to easily remove MariaDB from your Debian 10 system. 

In MariaDB replication is faster whereas in MySQL replication is slower. 

MariaDB is Open Source whereas MySQL uses some proprietary code in its Enterprise Edition. 

MariaDB doesn't support Data Masking and Dynamic column while MySQL supports it. Comparatively MariaDB is faster than MySQL.

Since MariaDB is a fork of MySQL, the database structure and indexes of MariaDB are the same as #MySQL. 

This allows you to switch from MySQL to MariaDB without having to alter your applications since the data and data structures will not need to change. Data and table definition files are compatible.


To install #MariaDB on #Debian , follow these steps:

1. First update the apt packages index by typing: sudo apt update.

2. Once the packages list is updated, install MariaDB by running the following command: sudo apt install mariadb-server.

3. The MariaDB service will start automatically.


Step by step process to Install the latest MySQL on Debian 10 ?

This article will guide you on how to #install #MySQL server on Debian 10 #Linux system. Also we looked into how to secure the installation and connect with the MySQL shell. Using the Validate password #plugin you can make a more secure database MySQL password #authentication.

MySQL is an #RDBMS tostore, retrieve, modify and administrate a database usingSQL.

The mysql #command:

1. -h followed by the server host name (server.linuxapt.com).

2. -u followed by the account user name (use your MySQL username).

3. -p which tells mysql to prompt for a password.

4. database the name of the database (use your database name).


Step by step process to install MongoDB on Linux Mint 20 ?

This article will guide you on methods to install MongoDB on #Linux #Mint 20 system. You can check #MongoDB status, and can also access its shell to pass #commands to this database.

MongoDB installs as a #systemd service, which means that you can manage it using standard systemd commands alongside all other sytem services in Ubuntu. To verify the status of the service, type: sudo systemctl status mongodb.

Companies and development teams of all sizes use MongoDB because: The document data model is a powerful way to store and retrieve data that allows developers to move fast. MongoDB's horizontal, scale-out architecture can support huge volumes of both data and traffic.

To start MongoDB in Debian:

1. Start MongoDB. Issue the following command to start mongod: sudo service mongod start.

2. Stop MongoDB. As needed, you can stop the mongod process by issuing the following command: sudo service mongod stop.

3. Restart MongoDB. Issue the following command to restart mongod: sudo service mongod restart.


MySQL on Ubuntu 20.04 LTS - How to Install and Configure ?

This article will guide you on how to install and configure #MySQL server on the #Linux system Ubuntu 20.04 in this article. Also, we have explored different basic commands to run MySQL server. MySQL is a relational #database that uses SQL to query a database. It facilitates data storing, modifying, and management in a tabular format. To install the latest version of MySQL in #ubuntu: 1. Enable MySQL #Repositories. 2. Install MySQL Repositories. 3. Refresh the Repositories. 4. Install MySQL. 5. Set up MySQL Security. 6. Start, Stop, or Check Status of MySQL Service. 7. Launch MySQL to Enter #Commands.