Error installing phpMyAdmin

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

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:

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.