• 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

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

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

3 Commands To Check USB Connection In Linux Terminal

Linux Terminal Commands for Beginners With Examples

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

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