How to install the MySQL database server and begin adding data –

How to install the MySQL database server and begin adding data - WPArena

The MySQL database server is a powerful tool that allows developers to expand the offerings of web sites, applications, and more. In fact, if it weren’t for the likes of MySQL, web server software like WordPress would have a lot of trouble functioning properly.

Why? Because databases store crucial information those platforms depend on. And without the means to serve that database information up, there’d be no way for the software to use the data. That’s where database servers like MySQL come into play.

MySQL is an open-source database server that can be installed and run on many platforms (such as Linux, Windows, and macOS). MySQL is a relational database, so it’s perfectly suited for apps like WordPress. What is a relational database? Simply put, a relational database is a set of formally described tables that house data which can be accessed in different ways. The information contained within a relational database is easily compared because it is saved in columns and rows.

But how do you install the MySQL database and how do you enter data into its tables? I’m going to walk you through that process. I’ll be demonstrating on the Ubuntu Server 18.04 platform. Although I’ll be using the command line, there are plenty of tools (such as phpMyAdmin) that make use of web-based or local client GUI applications for the process.

Once you have your database up and running, with data inserted, that database can then be used for in-house or third-party applications. Although you’ll be learning how to add data via the command line, you shouldn’t have much problem with it. If you do, you can always hire one of many third party QA services like BairesDev to help you with the task.

What You’ll Need

The only things you’ll need to make this work are:

  • A running instance of Ubuntu Server 18.04.
  • A user account with sudo privileges.

With those things at the ready, let’s install the database server, create a database, and add data.

Installing MySQL

Believe it or not, the installation of MySQL is actually quite simple. Log into your Ubuntu Server instance and issue the command:

sudo apt-get install mysql-server -y

Once the server is installed, you’ll want to start the server with the command:

sudo systemctl start mysql

Finally, you’ll want to enable the MySQL daemon to start upon server boot (in case you ever have to reboot the server). This is done with the command:

sudo systemctl enable mysql

Securing the Installation

Before you can create that first database and add data, you must secure the MySQL installation. This allows you to do the following:

  • Enable the Validate Password Plugin, which ensures that all passwords must adhere to strict password policies.
  • Create a password for the MySQL admin user.
  • Remove anonymous users.
  • Disable root login.
  • Remove the test database and access to it.
  • Reload



This article was written by Editorial Staff and originally published on WPArena.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

You have to agree to the comment policy.

Scroll to Top