Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Databases»MySQL»How To Install MySQL on Debian 8 (Jessie)

    How To Install MySQL on Debian 8 (Jessie)

    By RahulMarch 28, 20183 Mins Read

    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.

    Advertisement

    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

    Related Posts

    Securing MySQL Database with Limited User Permissions

    How to Install and Secure MongoDB on Ubuntu 22.04

    How to Install LAMP Stack on RHEL & CentOS Stream 9

    View 2 Comments

    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

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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