• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Install & Configure MySQL On Ubuntu 16.04

Install & Configure MySQL On Ubuntu 16.04

By Sourabh / June 8, 2016 Category: How To, Ubuntu

Install MySQL on Ubuntu 16.04. How to configure MySQL On Ubuntu 16.04. Terminal commands to install MySQL Server on Ubuntu 16.04.

Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by Oracle Corporation. For information about those platforms that are officially supported, see http://www.mysql.com/support/supportedplatforms/database.html on the MySQL Web site.

Install MySQL Server on Ubuntu

install-mysql-server

Step 1. Run the following command to install mysql-server package on Ubuntu 16.04 Systems:

sudo apt-get install mysql-server

While installing, you will be asked to select password for the account.

Step 2. Once MySQL is installed, run the following command to install mysql_secure_installation:

mysql_secure_installation

Verify MySQL Installation

mysql-status

Once MySQL is installed, you can verify the MySQL status using command:

On Ubuntu 16.04, Ubuntu 15.10, Ubuntu 15.04:

sudo systemctl status mysql

On Ubuntu 14.10 and previous versions of Ubuntu:

sudo service mysql status

Create a MySQL Database

Step 1. To create MySQL database, log into MySQL and follow the steps given below. First, run the following command to login to MySQL:

mysql -u root -p

When you are logged in, you’ll  see MySQL prompt.

Step 2. Now it’s time to create MySQL database and a user with appropriate permissions for the same. In this example, the database is called mydatabase, the user myuser, and password password:

CREATE DATABASE mydatabase;
GRANT ALL ON mydatabase.* TO 'myuser' IDENTIFIED BY 'password';

Step 3. Once done, run the command to exit MySQL:

quit

Tags: Configure MySQL On Ubuntu 16.04, Install & Configure MySQL On Ubuntu 16.04, Install MySQL on Ubuntu 16.04, MySQL On Ubuntu 16.04

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap