• 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

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

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

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