SOLVED [CPANEL-25765] SQL is missing from table export options in phpMyAdmin 4.8.4

chengkinhung

Member
Jun 15, 2007
18
1
53
Hi everyone,

I found the cPanel updated to 11.78 recently:
Code:
# cat /var/cpanel/updatelogs/update.1547660701.log |grep Downloading |grep phpmyadmin
[2019-01-17 01:48:10 +0800]   Downloading http://httpupdate.cpanel.net/RPM/11.76/centos/6/x86_64/cpanel-phpmyadmin-4.8.3-4.cp1176.noarch.rpm
Then the phpmyadmin export-format-list is missing SQL in the selector. After google, I found the solution:
github.com/phpmyadmin/phpmyadmin/issues/14775
export to SQL format not available for tables · Issue #14775 · phpmyadmin/phpmyadmin

github.com/phpmyadmin/phpmyadmin/commit/95114841420af6277b0406ec7f0d32c4ff3fcf27
Fix #14775 - export to SQL format not available for tables · phpmyadmin/[email protected]

support.plesk.com/hc/en-us/articles/360014662773-Option-to-export-table-in-SQL-format-is-missing-in-phpMyAdmin
Option to export table in SQL format is missing in phpMyAdmin

Code:
# wget http://httpupdate.cpanel.net/RPM/11.76/centos/6/x86_64/cpanel-phpmyadmin-4.8.3-4.cp1176.noarch.rpm

# rpm -qlp cpanel-phpmyadmin-4.8.3-4.cp1176.noarch.rpm |grep Display/Export.php
/usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/classes/Display/Export.php

# rpm2cpio cpanel-phpmyadmin-4.8.3-4.cp1176.noarch.rpm |cpio -t |grep Display/Export.php
./usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/classes/Display/Export.php

# rpm2cpio cpanel-phpmyadmin-4.8.3-4.cp1176.noarch.rpm |cpio -idv ./usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/classes/Display/Export.php
# wget https://github.com/phpmyadmin/phpmyadmin/raw/95114841420af6277b0406ec7f0d32c4ff3fcf27/libraries/classes/Display/Export.php
# diff -ruN ./usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/classes/Display/Export.php Export.php
--- ./usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/classes/Display/Export.php    2019-01-20 15:34:48.424000103 +0800
+++ Export.php  2019-01-20 15:02:22.718000105 +0800
@@ -662,6 +662,11 @@
             $GLOBALS['single_table'] = $_POST['single_table'];
         }

+        // Export a single table
+        if (isset($_GET['single_table'])) {
+            $GLOBALS['single_table'] = $_GET['single_table'];
+        }
+
         /* Scan for plugins */
         /* [USER=24193]@var[/USER] $exportList ExportPlugin[] */
         $exportList = Plugins::getPlugins(
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello @chengkinhung,

We're tracking this issue internally as part of case UPS-89. I'll update this thread as soon as new phpMyAdmin version or patch is released as part of a cPanel & WHM update. In the meantime, the following steps are available as a temporary workaround:

1. Open phpMyAdmin from cPanel or WHM.
2. Browse to a database.
3. Instead of browsing to the individual table, select the individual table from the table list.
4. Click on the "Export" tab.
5. Notice "SQL" is correctly listed as an export format.

Thank you.
 

FidoSysop

Member
Dec 29, 2018
9
1
1
Clearwater Florida
cPanel Access Level
Root Administrator
So after upgrading to WHM 78.0.11and still running MySQL 5.6.43 what happened to export database table as sql?

I used to be able to export a database table to my windows pc, then use a text editor to search and replace a url. Then delete that table from my database and import the modded table. After upgrading whm to current as of this post the default export is CodeGen with a drop down format list that does not list SQL.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello Everyone,

To update, this is fixed in cPanel & WHM version 78.0.13 as part of an update to the cpanel-phpmyadmin RPM:

Fixed case CPANEL-25765: Update cpanel-phpmyadmin to 4.8.3-7.

Thank you.