Support

Admin Tools

#16205 MySQL Error #1062 and #2006

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Thursday, 13 June 2013 15:50 CDT

user39386
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 3.1.1
PHP version: 5.4.15
MySQL version: tried with both 5.5.29 and 5.6.10
Host: local machine
Admin Tools version: 2.5.5

Description of my issue:

Hi Nicholas,

Although this issue isn't specifically isolated to Admin Tools Pro, I wanted to see if you can help me solve this.

I was using a homebrew installation of MySQL 5.5.29 and phpMyAdmin 3.5.5 and I upgraded MySQL, PHP5 and phpMyAdmin to the most current versions (again, using homebrew).

Ever since then, I am having all sorts of issues, including the error below when trying to install Admin Tools Pro.

1062 Duplicate entry '2' for key 'PRIMARY' SQL=INSERT INTO `u5z87_extensions` (`name`,`type`,`element`,`folder`,`client_id`,`enabled`,`access`,`protected`,`manifest_cache`,`params`) VALUES ('admintools','component','com_admintools','','1','1','1','0','{\"name\":\"Admintools\",\"type\":\"component\",\"creationDate\":\"2013-05-11\",\"author\":\"Nicholas K. Dionysopoulos\",\"copyright\":\"Copyright (c)2010 Nicholas K. Dionysopoulos\",\"authorEmail\":\"[email protected]\",\"authorUrl\":\"http:\\/\\/www.akeebabackup.com\",\"version\":\"2.5.5\",\"description\":\"Security and utilitarian tools for Joomla! site administrators\",\"group\":\"\"}','{}')


In order not to repeat a very long pst, I have detailed my problems on stack overflow, including the steps I have taken to try (unsuccessfully) to resolve my issues. http://stackoverflow.com/questions/16771469/mysql-error-2006-mysql-server-has-gone-away-after-upgrade-to-5-6-10-using-homebr

Since my issues are affecting Admin Tools Pro, I thought I'd reach out to you to see if you can help me solve them. I need a functioning local installation. Everything was working fine, and I just had to be adventurous and go upgrade, and now nothing is working.

Thanks,

nicholas
Akeeba Staff
Manager
It's actually a Joomla! issue the workaround to which I have documented under "Joomla! 1.6/1.7/2.5 installation problems". Replace com_akeeba in those instructions with com_admintools

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user39386
Hi Nicholas,

I would agree with you, if the issue was limited to Joomla! But, I am getting these errors even at the command prompt of mysql, and as you will see if you read my very long post on stack overflow, when I issue a show databases command in mysql on the command line, it outputs that I only have an information_schema dabatase, whereas in phpmyadmin, I show all my databases, 14 in total.

Also, I am using J3.1.1 which may or may not have that issue which you have documented (I have not tried your solution yet, but I am getting the same error when trying to install nonumber extension manager as well.)

Any thoughts?

user39386
Just tried your instructions and got the same result.

First went to Extensions, Extensions Manager, Manage, searched for any mentions of Admin Tools or com_admintools and uninstall them. There were none.

Table jos_assets - Searched for the row where the name column is com_admintools and delete it. There were none.

Table jos_extensions - Searched for the row where the type column is plugin and the element column is com_admintools and delete it. There were none.

Table jos_menu - Found the row where the title is COM_AADMINTOOLS and deleted it There was one.

Tried to reinstall, and got the same error.

nicholas
Akeeba Staff
Manager
For some reason your #__extensions table's id field is not set to auto_increment.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user39386
OK...so how do I solve this?

And as I said, it isn't just in Joomla...I think it is a MySQL thing, because I cannot add new users...I get a #2006 - MySQL server has gone away error when I try to add a new user.

nicholas
Akeeba Staff
Manager
If the table's definition is broken you need to reinstall Joomla!. If the server itself is screwed up too, you will need to recompile the MySQL server.

And that's why you stick to precompiled packages unless You Know What You're Doing™ ;) (Yes, I learned it the hard way)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user39386
Well, that's why I used homebrew. It does all the heavy lifting...but this time...it messed up it seems like
And I have no patience right now to put up a virtual environment like MAMP Pro or Zend or something like that because I have so many aspects of my system so perfectly configured otherwise.

I would rather go through a reformat and reinstall of my entire Mac than go virtual. :)

This isn't my Joomla install, because this was a brand new installation, newly instantiated database, and plain vanilla as far as plugins go. So it is MySQL. :(

nicholas
Akeeba Staff
Manager
I've tried Homebrew once, a little over two years ago. It didn't pan out very well. I'm now using one installation of Zend Server (it only took me 3 hours to configure it the way I want it) and an auxiliary installation of MAMP (when I want to test with PHP 5.3). I also have several virtualised server which, yes, are a real pain in the rear to maintain. I actually had to pay extra to get a MacBook Pro with 16Gb of RAM and a better processor just because of the VMs (they eat up RAM and CPU for breakfast).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user39386
Hi Nicholas,

I have come to better understand the problem (although not in any way that I can resolve on my own).

It appears that there is an incompatibility between Akeeba (and NoNumber) extensions and MySQL 5.6.10.

I went through the gargantuan and most distressing process of totally reformatting and reinstalling my Mac OS X 10.8.4. Then, before making any changes, I installed MySQL using homebrew. The current version of MySQL installed by Homebrew is 5.6.10. I then used properly functioning backups created from my web sites on hostgator using Akeeba Backup Pro to recreate local installs.

Lo and behold, the problems arise again. So, this lead me to see if it had something to do with the homebrew installation of mysql 5.6.10 or if it was related to all installations of 5.6.*...and so I removed the homebrew version and then installed the DMQ distribution from MySQL directly. This time, the version was 5.6.12 (homebrew installs 5.6.10). Same problem.

Even though I may be lonely in the world of 5.6.* deployments right now, more users will start upgrading to 5.6.*, and hosting providers will start deploying 5.6.* as well, so it would be good to try and solve this issue.

I don't have the technical skills to solve this, and perhaps you could work with Peter from NoNumber to isolate the cause, as it affects his extensions as well. I know this because I can install almost all other extensions from all other developers without a problem, including extensions from RSJoomla, RocketTheme, YooJoomla, K2, SobiPro, JomSocial, JoomlaBamboo, Breezing forms and many others without a problem.

nicholas
Akeeba Staff
Manager
You have an issue that nobody else has reported with core Joomla!. Please do note that the SQL query you reported occurs during installation and is created and run by Joomla!'s extensions installer (com_installer). At this point our code does not run. I would be very surprised if our code, which hasn't run, has had a magic effect on how core Joomla! works.

So let me recap:
1. The problem only happens on your machine. Nobody else can reproduce it on no other server. This means that troubleshooting is impossible unless you give us your machine.
2. Your problem is a query in core Joomla!. Even if you would send us your machine we would still be unable to help you as neither me nor Peter have written that code.
3. My code and Peter's code couldn't be further apart. We follow completely different ways of developing software. Even if we could for a minute ignore the fact that it's a Joomla! core component (actually, the JInstaller core class and its satellite classes) that gives you the problem we'd see that there is no resemblance between mine and Peter's code.

All of that means that your problem is unique to you, is unrelated to our code and impossible to troubleshoot.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!