0
Welcome Guest! Login
0 items Join Now

phpMyAdmin: Create DB on Export = Suck

    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    phpMyAdmin: Create DB on Export = Suck

    Posted 9 years 8 months ago
    • ...slow to upgrade software, especially when everything works perfectly. However, I upgraded phpMyAdmin and now when I try to simply export a localhost db and upload to my host using cPanel, I get some error about the sql file trying to create a db by the same name as the export.

      The only workaround I could figure out is to comment out the following in the .../export.php file:


      if (! $export_plugin->exportDBCreate($db)) {
                  break;
              }

      Is there a simple toggle or setting somewhere to stop the dump from wanting to create a new db?

      I'm good to go removing those lines, but I really hate hacking the core...just thought I would see if anyone else ran into this issue.
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: phpMyAdmin: Create DB on Export = Suck

    Posted 9 years 8 months ago
    • Is this going to cPanel Backups and downloading the database or is this going to phpMyAdmin, choosing the database, then going to the Export tab?

      I think the two are different in that the Backups section one is set to "restore" a backup and the "Export" one is set to export the data so it can be loaded into another database.
    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    Re: phpMyAdmin: Create DB on Export = Suck

    Posted 9 years 8 months ago
    • Ben Lee wrote:
      Is this going to cPanel Backups and downloading the database or is this going to phpMyAdmin, choosing the database, then going to the Export tab?

      Hey, Ben...long time, not since our early JomSocial days. :)

      The later. I develop a localhost site, then go through phpMyAdmin -> Select the DB -> Export -> Save as .sql just as I have always done. Now, however, when I go to import it into my host's phpMyAdmin into a db I have already created, it fires the error that it can't create the database that the exported dump is trying to create...just doesn't importlike it used to. (if that makes any sense)

      The export feature now seems to be adding a 'create db by the same name' command to the dump...and only way I can get it to work is to comment out this feature in the export.php file of phpMyAdmin.
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: phpMyAdmin: Create DB on Export = Suck

    Posted 9 years 8 months ago
    • That's definitely different than what I've experienced. I don't think its an issue to comment out those lines to prevent the database from being created, but I do understand wanting to have it just work.

      I'll ask around and see if anyone else knows.
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: phpMyAdmin: Create DB on Export = Suck

    Posted 9 years 8 months ago
    • Hi Terp,

      At the risk of teaching granny to suck eggs, have you checked the advanced options in the export?

      Should be set like the image below...


      This image is hidden for guests.
      Please log in or register to see it.


      I suspect if you check yours there may be a tick in that first option.

      If this resolves your problem then please edit your first post in this thread by adding [SOLVED] at the start of the title and click on the icon and select the 'tick' icon. This lets the moderators know that it can be moved to the solved section.

      Thanks for your cooperation :)
    • Last Edit: 9 years 8 months ago by David Goode. Reason: Typo

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information

Time to create page: 0.040 seconds