In this guide we will learn, how to install MySQL Server 5.7 on Ubuntu 14.04 LTS. We always recommend our readers to read release notes of every mysql.

If you are specifically looking for MySQL Server 5.6 server installation , you can read our previous post.

Our Environment
Operating System : Ubuntu 14.04 LTS
Arch: x86_64
MySQL Server: 5.7

Install MySQL Server 5.7 prerequisites

You can download the repository package from mysql download page.

Use wget command to download the repo package on to your system.

sudo wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb

By using dpkg command you can install the repo deb package.

sudo dpkg -i mysql-apt-config_0.6.0-1_all.deb

After installation , you will find new changes in apt directory so lets check this out as well.
After installing the mysql repo deb package, it will create new file called mysql.list inside directory /etc/apt/sources.list.d/.

Run the command cat /etc/apt/sources.list.d/mysql.list and you will see some mysql repo URLs in mysql.list file.

cat /etc/apt/sources.list.d/mysql.list 
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7

deb-src http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7

Install MySQL Server 5.7

For installing MySQL server 5.7 on Ubuntu 14.04 LTS, run the below given command.

sudo apt-get update

sudo apt-get install mysql-server-5.7

Now after a few seconds, you will some screen on your terminal. This is for installation instruction for MySQL Server. It is quite easy to understand the screen, we only have to provide our inputs.

In given below screenshots, we have shown the options which we have selected [Highlighted]

MySQL Server 5.7

Mysql server 5.7

mysql server 5.7

In next screen, provide MySQL root password. It will ask for reconfirmation in another screen.

mysql server 5.7

mysql server 5.7

The installation will be completed after getting all inputs as instructed in above all screenshots.

To check the login with mysql root user, use the given below command –
Note: Provide the password which you have set while installation of MySQL Server 5.7

mysql -u root -p

Given below is reference from our system

 mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.7.10 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> 

MySQL Service to Start/Stop/Restart/Status

(a) To restart the mysql service

sudo service mysql restart

(b) To start mysql Service

sudo service mysql start

(c) To stop mysql service

sudo service mysql stop

(c) To get status of mysql service

sudo service mysql status

NOTE: For start/stop/restart/status of mysql , use service command

Read Some More Articles

2 Comments

  1. I’ve just run:
    sudo apt-get install mysql-server
    without the 5.7 version in the end
    and the right version was chosen

    hope this helps

  2. Hi, thanks for your tutorial. I’m trying to install mysql-server 5.7 on Ubuntu 14.04 Server 64bit. After dpkg command the system ask to me to select mysql product and mysql server version and after the selection of “Apply” option it come back on terminal. Then I run apt-get update command and at the end of the repositories list I have the messages “Ign http://repo.mysql.com trusty/mysql-5.7″ and “Ign http://repo.mysql.com trusty/mysql-apt-config” and I’m unable to install the new version of mysql from aptitude. Anyone know this issue? Why the new repositories are ignored?
    Thanks in advance.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.