Error installing phpMyAdmin

Posted October 11, 2019 3.8k views
LAMP Stack

I am using DigitalOcean to learn Ubuntu.
I have a droplet setup and have following all previous tutorials and resolved all problems by searching Digitalocean or other resaources online.
My droplet is running Ubuntu 18.04.3 and has a LAMP stack installed and tested (basic test).

I am now tring to install PhpMyAdmin using this ( but getting a circular error when connecting PhpMyAdmin to my MySQL which has a root password set.

  • I select reconfigure Apache 2 (okay)
  • I select to configure database for phpmyadmin using dbconfig-common {THIS CREATES ERROR}
mysql said: ERROR 1064 (42000) at line 1: You have an error in your SQL
 │ syntax; check the manual that corresponds to your MySQL server version
 │ for the right syntax to use near 'IDENTIFIED BY 'O9NrTHwK7heC'' at line
 │ 1 . Your options are:
 │  * abort - Causes the operation to fail; you will need to downgrade,
 │    reinstall, reconfigure this package, or otherwise manually intervene
 │    to continue using it. This will usually also impact your ability to
 │    install other packages until the installation failure is resolved.
 │  * retry - Prompts once more with all the configuration questions
 │    (including ones you may have missed due to the debconf priority

I have follow the abort / retry paths and responded to different senarios but do not seem to resolve this.
Appreciates your support

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

Hey, @jgitonga

Looking at this, this might be due to the password selected - ‘O9NrTHwK7heC’’

as you can see there are two “ at the end of the password where MySQL will only expect one. If you use quotations in your password you can remove it at the end and put it somewhere else rather than at the beginning and at the end in order to avoid Syntax Errors.

Let me know how it goes.

  • alexdo, thanks - this password was auto generated - i have tried with many other password - like RoygbiV&2091 - but still same error - with the password always showing the one used in that instance

    • Can you please let me know which is the exact version of phpMyAdmin that you’re trying to install? Also which is the version of MySQl as well.

      • Hi alexdo,
        As I said, I am new to Linux and I am just using this DigitalOcean droplet to learn cloud computing. So far, I am making good progress. I do not mind damaging anaything as it actually does not have data. My aim is to install Moodle LMS and an associated website. For now am just exploring and gaining knowledge - thank for your help.

        My MySQL version is -> mysql Ver 8.0.17 for Linux on x86_64 (MySQL Community Server - GPL)

        For phpMyAdmin, I am using this tutotial ( to install phpMyAdmin from the default Ubuntu repositories.


i really struggled with this issue while setting up a server on Digital Ocean. I needed a server to Host a Laravel application. Basically i had to setup my server by installing Nginx using this Tutorial, then i installed MYSQL Version 8.0.22 using this Tutorial (basically the latest available version - Which usually leads to this error), then i installed PHP7.4 using this Tutorial of which also required me to check the DigitalOcean article to configure the php processor for Nginx using the same Tutorial i used to install Nginx.

At this point i wanted to install phpMyAdmin, and it failed with the same error, i read every article i could find on Digital Ocean, Stackoverflow and other forums and no solution worked. I found out i could download phpMyAdmin version 5.0.4 or greater (Basically the latest version) from the official website since it would be more compatible with the MYSQL Version 8.0.22. I followed this Tutorial exactly to install phpMyAdmin manually instead of automatically and everything worked perfectly! I was able to open the phpMyAdmin on the browser and even able to login using root and password. I created another user as indicated on the tutorial and was also able the login using that new user.

Really hope this helps someone having the same issue. In conclusion use this article to install phpMyAdmin manually:

by Justin Ellingwood
by Mark Drake
This tutorial details the process for installing and configuring the components that constitute a LEMP stack on an Ubuntu 18.04 server, including Nginx, MySQL, and PHP. It also includes instructions for testing that these components can communicate effectively and serve your content correctly.
Submit an Answer