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.
Operating System : Ubuntu 14.04 LTS
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]
In next screen, provide MySQL root password. It will ask for reconfirmation in another screen.
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