Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»MySQL»How To Install MySQL on Debian 8 (Jessie)

    How To Install MySQL on Debian 8 (Jessie)

    RahulBy RahulMarch 24, 20183 Mins ReadUpdated:March 28, 2018

    The Debian 8 default repositories contain MySQL packages. You can simply install MySQL on Debian 8 Jessie machine with few simple commands. But the default repositories don’t contain the latest MySQL version. So this tutorial will help to install MySQL on Debian 8 Jessie system with the latest version. Go through the step by step tutorial for the MySQL installation.

    Step 1 – Prerequisites

    Login to your Debian 8 system using shell access. For remote systems connect with SSH. The Windows desktop users can use Putty any other SSH client to connect their server.

    ssh [email protected]
    

    Run below commands to upgrade the current packages to the latest version.

    sudo apt update 
    sudo apt upgrade
    

    Step 2 – Setup MySQL PPA on Debian 8

    Download the MySQL PPA configuration package from the official website of MySQL. The below commands will do the MySQL PPA setup on Debian 8 automatically.

    wget http://repo.mysql.com/mysql-apt-config_0.8.9-1_all.deb
    sudo dpkg -i mysql-apt-config_0.8.9-1_all.deb
    

    With the installation of above package, this will prompt to select MySQL version to install on your system. Select the MySQL 5.7 or 5.6 to install on your system.

    Step 3 – Install MySQL on Debian 8

    You are ready now for the MySQL installation on a Debian 8 Jessie machine. Execute the following commands to install MySQL on a Debian 8 machine.

    sudo apt update 
    sudo apt install mysql-server
    

    The installation process will prompt for the root password to set as default. Input a secure password and same to confirm password window. This will be MySQL root user password required to log in to MySQL server.

    Step 4 – Secure MySQL Installation

    Execute the below command on your system to make security changes on your Database server. This will prompt some questions. The do the high security provide all answers to yes.

    sudo mysql_secure_installation
    

    Step 5 – Connect MySQL

    Your system is ready with the MySQL database server. Simply connect to the MySQL using command line client. This will require the root password configured in step 3 to connect database server.

     mysql -u root -p
    
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 5
    Server version: 5.7.21 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2018, 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>
    
    database install mysql on debian MySQL
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Tomcat 9 on Debian 11/10/9
    Next Article How To Install Shutter Screenshot Capture Tool on Ubuntu

    Related Posts

    Backup MySQL Databases to Amazon S3 (Shell Script)

    Updated:May 28, 20222 Mins Read

    How to Install MariaDB on Ubuntu 22.04

    Updated:May 28, 20222 Mins Read

    How To Install Linux, Nginx, MySQL, & PHP (LEMP Stack) on Ubuntu 22.04

    Updated:April 7, 20227 Mins Read

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How to Install Apache, MySQL, PHP (LAMP Stack) on Ubuntu 22.04

    Updated:June 28, 20225 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    2 Comments

    1. MohammadReza on April 28, 2020 6:25 pm

      hi !
      how can i make database and mysql username ??

      Reply
    2. Dragos on March 18, 2019 3:18 pm

      Very useful description ! Congrat!

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    • How to Install Composer on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.