How to Reset MySQL or MariaDB Root Password

This post shows students and new users steps to reset or change MySQL or MariaDB password when using Ubuntu Linux. One can create and reset the root passwords easily via its command terminal or shell when using MySQL or MariaDB.

If you have forgotten the root password, the steps below will show you how to reset it easily without deleting and reinstalling the database server.

Forgetting your desktop password is one thing. However, forgetting the root password to your MySQL database in production is totally another thing and not fun. And if you did, then this post is show you show you how to recover the root password.

Also, for students and new users learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

Continue reading “How to Reset MySQL or MariaDB Root Password”

How to Install MySQL or MariaDB on Ubuntu Linux

This post shows students and new users steps to install MySQL or MariaDB on Ubuntu Linux. MariaDB and MySQL are twins. Both MySQL and MariaDB is an open-source, multi-threaded relational database management systems. MariaDB is a backward compatible replacement for MySQL.

You can uninstall MySQL and install MariaDB, and your applications may not even know the difference. Since these two databases are identical, we’re going to write a single post detailing how to install both on Ubuntu Linux.

MariaDB maintained and developed by the MariaDB Foundation while MySQL is owned by Oracle.

If you’re a student or new user learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

Continue reading “How to Install MySQL or MariaDB on Ubuntu Linux”

How to Check MySQL Version in Ubuntu Linux

This brief tutorial shows students and new users how to check MySQL | MariaDB server versions in Ubuntu Linux.

How do you know which versions of MySQL or MariaDB database server you’re running? How do you find out? What command do you use?

The answer for all your questions detailed below.

Nowadays, everywhere you look you’ll find MariaDB database server being used with many opensource projects. This was not the case few years ago.

Then, MySQL was the probably the only database server used in majority of the opensource projects. However, licensing changes made by Oracle, the new parent company established an alternative to MySQL called MariaDB.

MariaDB is a drop-in replacement for MySQL. This means that for many cases, you can just uninstall MySQL and install MariaDB and you are good to go. There is not generally any need to convert any data files.

Whatever database you use, the commands below should work in finding out the version of MySQL or MariaDB.

Continue reading “How to Check MySQL Version in Ubuntu Linux”

Setup MariaDB Self Signed SSL/TLS on Ubuntu

This brief tutorial shows students and new users how to connect to MariaDB via SSL/TLS on Ubuntu 20.04 | 18.04.

By default when you install MariaDB server, it will allow connections from any systems for users with the correct credentials.

If you want to add another layer of security, you can enable SSL/TLS settings and force all users to connect securely.

For this tutorials, we’re going to be creating a self signed certificate to configure with MariaDB.

Continue reading “Setup MariaDB Self Signed SSL/TLS on Ubuntu”

How to Connect to MariaDB via SSL/TLS on Ubuntu

This brief tutorial shows students and new users how to connect to MariaDB via SSL/TLS on Ubuntu 20.04 | 18.04.

By default when you install MariaDB server, it will allow connections from any systems for users with the correct credentials.

If you want to add another layer of security, you can enable SSL/TLS settings and force all users to connect securely.

For this tutorials, we’re going to be using existing Let’s Encrypt SSL certificates to configure with MariaDB.

Continue reading “How to Connect to MariaDB via SSL/TLS on Ubuntu”

How to Backup and Restore MariaDB Databases

This brief tutorial shows you how to backup and restore MariaDB databases and data files on Ubuntu 20.04 | 18.04.

MariaDB 10.1 introduced a new backup feature called Mariabackup.

Mariabackup is an an open source tool provided by MariaDB for performing physical online backups of InnoDB, Aria and MyISAM tables. It also enabled “hot online” backups for InnoDB tables.

Mariabackup doesn’t only back up databases, it also backs up many different files in order to perform its backup and restore operations.

Continue reading “How to Backup and Restore MariaDB Databases”

How to Install MariaDB on Ubuntu 20.04 | 18.04

This brief tutorial shows students and new users how to install MariaDB server on Ubuntu 20.04 | 18.04 LTS.

MariaDB is a true opensource, fast, secure and scalable relational database management system. It is a fork of MySQL and one of the key components of the LAMP or LEMP stack that powered countless websites and applications online today.

MariaDB sever is also now the default database server in most opensource projects, MySQL is the father of MariaDB and both are the same with different names.

For more about MariaDB, please check its homepage.

Continue reading “How to Install MariaDB on Ubuntu 20.04 | 18.04”

Allow Remote Access to MariaDB Database Server on Ubuntu 18.04

This brief tutorial shows students and new users how to configure remote access connection to MariaDB database servers on Ubuntu 18.04 systems.

By default when you install MariaDB database server, it only accepts connections its local host. The same host computer it is installed on.

If want to connect from a remote client computer from a remote location, you will not be able to connect databases setup on the server. This brief guide shows you how to enable that.

When configured correctly, you will be able to connect to the database servers from a remote systems and applications not connected to the same subnet or host computer.

If the server is connected directory to the Internet, you may able able to access it from anywhere around the world where Internet access is available. however, opening up your database servers directly to the internet is not recommended, especially in a production environment.

Continue reading “Allow Remote Access to MariaDB Database Server on Ubuntu 18.04”

Changing MySQL / MariaDB User Passwords on Linux (Ubuntu)

There may be a time when you want to change a database user password. Some reasons for changing MySQL or MariaDB database user passwords might be to ensure strong password, the account is compromised or just doing some house cleaning.

This brief tutorial shows students and new users how to change MySQL or MariaDB database user password to something strong and unique which might help improve your system security.

This post applies to both MySQL and MariaDB database servers. Since both use the same underlying code.

In fact, MariaDB is a drop-in replacement for MySQL. So in the future you decide to switch from MySQL to MariaDB, you should just be able to do it without impacting applications.When you’re ready to learn how to change database users passwords, follow the steps below:

Continue reading “Changing MySQL / MariaDB User Passwords on Linux (Ubuntu)”

Setup MariaDB Master / Slave Replication on Ubuntu 16.04 | 18.04

For security and fault tolerance reasons, setting up MySQL / MariaDB master and slave replication is a way to go. In a master and slave setup, one database server serves are the primary or master and the other(s) as slave in this topology.

Changes made on the master server are replicated to the slave servers. the replication is asynchronous and automatic.

This setup is necessary in situations where you want to scale, provide live backups for disaster recovery and fault-tolerance.

Each replication slave must have a unique server ID. If you are setting up multiple slaves, each one must have a unique server-id value that differs from that of the master and from any of the other slaves.

This brief tutorial shows students and new users how to setup MySQL / MariaDB master and slave replication on Ubuntu 16.04 | 18.04 servers.To get started, follow the steps below:

Continue reading “Setup MariaDB Master / Slave Replication on Ubuntu 16.04 | 18.04”

WordPress Tips – Removing MySQL Database and User on Ubuntu 16.04 | 18.04

Sometimes you may want to drop or delete old databases and user accounts on MySQL (MariaDB) server. When running a website powered by WordPress or other content management system (CMS) that uses a database server like MySQL or MariaDB, and you want to delete old databases that are no longer in used, you can use the steps below to do that.

This brief tutorial shows students and new users how to remove old MySQL databases and users associated with those databases using the command line terminal on Ubuntu and other Linux distributions.

The steps are intended for removing MySQL database and user on Linux via the command line only. and you should be extremely careful when dropping MySQL databases.When you’re ready to drop MySQL databases and associated users on Ubuntu, follow the steps below:

Continue reading “WordPress Tips – Removing MySQL Database and User on Ubuntu 16.04 | 18.04”

How to Change MySQL / MariaDB User Passwords on Ubuntu 16.04 | 18.04

After installing MySQL or MariaDB server, one can create and reset user passwords easily via its command terminal or shell. For example, if you wish to reset or change MySQL / MariaDB root password or another user, the steps below will help you do that.

This brief tutorial shows students and new users how to easily change MySQL or MariaDB user password via its shell terminal.

This tutorial is not about retrieving forgetting user’s passwords. You must already know the current password for the root account for this to work. You won’t be able to reset user passwords without first knowing the root password to logon to MySQL or MariaDB server.When you’re ready to reset user passwords, follow the steps below:

Continue reading “How to Change MySQL / MariaDB User Passwords on Ubuntu 16.04 | 18.04”