5

I tried installing phpmyadmin on Debian Squeeze with a nginx and mysql-server installed. I ran sudo apt-get install phpmyadmin, and all appeared to be going well until setup threw me this:

An error occurred while installing the database: 

mysql said: ERROR 1064 (42000) at line 72: 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 '(14) NOT NULL, `sqlquery` text NOT        
NULL, PRIMARY KEY (`id`), KEY `usernam' at line 6

...what do?

4
  • Please show us the full output or at least some infos before that?
    – quanta
    Dec 15, 2011 at 6:28
  • @quanta what do you want me to show? It asks me whether I want to do dbconfig_common, I say yes, it asks for the root password, and then it gives me that error.
    – jibcage
    Dec 15, 2011 at 6:54
  • What is your sources.list? Paste it. Chances are your mixing repositories.
    – user104294
    Dec 15, 2011 at 22:39
  • The error is quite strange. apt-get clean and try again. If if didn't work, you can download the phpmyadmin source code and extract to Apache document root.
    – quanta
    Dec 16, 2011 at 4:16

3 Answers 3

10

Replace "timestamp(14)" by "timestamp" in /usr/share/dbconfig-common/data/phpmyadmin/install/mysql (pma_history section).

Then reinstall phpmyadmin.

1
  • Editing files installed by a Debian package like this can cause a maintenance problem as your edits can be overwritten by a package update. You should divert the file to avoid this (see dpkg-divert). Can I also encourage you to file a Debian bug against the phpmyadmin package (sudo apt-get install reportbug; reportbug) as it appears to be broken. Apr 1, 2013 at 15:50
0

Reconfiguring phpmyadmin (instead of reinstalling it) after having fixed the script as suggested by Krevindiou might be good enough:

sudo dpkg-reconfigure phpmyadmin
0

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: https://www.digitalocean.com/community/questions/how-to-install-manually-phpmyadmin-on-ubuntu

1
  • Link-only answers (the key learning in your answer is to follow an outside tutorial) don't fare well here, because links rot over time. Please include some information summarizing what is in the outside content so your answer can stand alone.
    – sysadmin1138
    Nov 18, 2020 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.