Linux Server7 minutes

    Install MySQL & phpMyAdmin on Linux

    Guide to setting up database and management interface

    1. 1
      Step 1

      Update System

      Start by updating your package list.

      sudo apt update && sudo apt upgrade -y
    2. 2
      Step 2

      Install MySQL Server

      Install the MySQL server package.

      sudo apt install mysql-server -y
    3. 3
      Step 3

      Secure Installation

      Run the security script to set root password and remove anonymous users.

      sudo mysql_secure_installation
      Secure Installation
    4. 4
      Step 4

      Install PHP & Apache

      phpMyAdmin requires a web server and PHP to run.

      sudo apt install apache2 php libapache2-mod-php php-mysql -y
    5. 5
      Step 5

      Install phpMyAdmin

      Install phpMyAdmin and select apache2 when asked for web server selection.

      sudo apt install phpmyadmin -y
    6. 6
      Step 6

      Enable PHP Extension

      Enable the mbstring extension required by phpMyAdmin.

      sudo phpenmod mbstring
      sudo systemctl restart apache2
    7. 7
      Step 7

      Create New User

      It is better to create a new user instead of using root. Log in to MySQL and create a user.

      sudo mysql -u root -p
      CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
      GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%';
      FLUSH PRIVILEGES;
      EXIT;
    8. 8
      Step 8

      Access phpMyAdmin

      Now you can access the dashboard via browser: http://your_server_ip/phpmyadmin

    Need help?

    Steps didn't work for you? Our support team is available around the clock.

    Contact support