PhpMyAdmin database dump file wont restore to fresh Xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PhpMyAdmin database dump file wont restore to fresh Xampp

Postby haslamjd » 05. December 2018 00:14

I had an old XAMPP 5.6.8 install that I blew away to upgrade to the latest version. I did the following: (1) - opened phpmyadmin and did an export of all my databases to an .sql file. (2) - copied my htdocs folder to a new location (3) - uninstalled XAMPP 5.6.8 (4) - Installed XAMPP 7.2.11 (5)- Copied my htdocs folder back to the new installation (6) - Went to phpmyadmin and tried to import my database dump file ending in .sql - [which fails to finish].

After doing all this, the dump database file won't complete the restore of all my databases. I have tried several online queries for the answer, but each seem to only explain how to import an existing database. I cannot find how to import all my databases back into a fresh install of phpmyadmin/MySQL. I have also tried bigdump, but that keeps stopping on errors found within the .sql dump file syntax that phpmyadmin created. One would think that if phpmyadmin made the dump file, that there would be a way to import that file back. But sadly I am not finding an answer, and now all my databases are probably toast.

Does anyone know how to do this action to get my databases back?

Thanks for any help you can offer!
haslamjd
 
Posts: 11
Joined: 08. March 2007 19:40

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby Altrea » 05. December 2018 07:47

haslamjd wrote:(6) - Went to phpmyadmin and tried to import my database dump file ending in .sql - [which fails to finish].

Did you get any error message?
Did you create the Database first or does your sql file contain a CREATE DATABASE statement?
Are you sure the sql file was created completely?
Do you have another backup like a Backup of your entire xampp folder?

haslamjd wrote:I have also tried bigdump, but that keeps stopping on errors found within the .sql dump file syntax that phpmyadmin created.

To know which error messages are occuring could speed up the identification of your issue.

haslamjd wrote:One would think that if phpmyadmin made the dump file, that there would be a way to import that file back.

There is no general sql dumpfile. You can define very precisely what you want to dump into an sql export file.
Depending on the dump it can be neccessary to do some groundwork first like creating the database, creating the database tables, etc.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby haslamjd » 05. December 2018 15:52

Thank you for your response. You asked the following:

Did you get any error message?
Yes: "No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration."
In looking at the .sql file using notepad I can see it contains all the data from the databases, the tables and the databases. I also went in and edited the php.ini file to increase the max_execution_time, upload_max_filesize, and memory_limit to accommodate the large .sql file, but got the same error. The .sql file is 16,871 KB, and I increase the max_filesize to 20M.

Did you create the Database first or does your sql file contain a CREATE DATABASE statement?
The .sql file contains the CREATE DATABASE statement so I have not created any of the databases or their tables. The file has the CREATE statements for each of these.

Are you sure the sql file was created completely?
I created two separate files as a precaution, and both give the same error when I try to Import the files. They are also both the same file size, so I hope they are complete, the .sql file has all the databases and tables and data that I had originally.

Do you have another backup like a Backup of your entire xampp folder?
Yes, I backed up the old XAMPP folder and all the files

BigDump gives this error:

Error at the line 3169: ) ENGINE=MyISAM AUTO_INCREMENT=440 DEFAULT CHARSET=utf8;

Query: --
--
CREATE TABLE IF NOT EXISTS `oc_product_special` (
`product_special_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`customer_group_id` int(11) NOT NULL,
`priority` int(5) NOT NULL DEFAULT '1',
`price` decimal(15,4) NOT NULL DEFAULT '0.0000',
`date_start` date NOT NULL DEFAULT '0000-00-00',
`date_end` date NOT NULL DEFAULT '0000-00-00'
) ENGINE=MyISAM AUTO_INCREMENT=440 DEFAULT CHARSET=utf8

Thank you for your help with this. The data is very important, and would be time consuming to recreate from scratch.

haslamjd
haslamjd
 
Posts: 11
Joined: 08. March 2007 19:40

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby Altrea » 05. December 2018 16:33

Did you increase the post_max_size value in your php.ini too?
Did you restart Apache after changing these values?
What does phpinfo() say about the current values of these php settings?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby haslamjd » 05. December 2018 16:57

You asked:
Altrea wrote:Did you increase the post_max_size value in your php.ini too?
Did you restart Apache after changing these values?
What does phpinfo() say about the current values of these php settings?


My response:
No, the post_max_size was set to 2M.

Yes, I stopped and restarted both apache and mysql.

phpinfo() says:

max_execution_time 30
max_file_uploads 20
max_input_time 60
post_max_size 2M

I reset the php.ini setting for max_post_size to 20M, stopped and restarted both Apache and MySQL. Went into Import and tried the .sql file again and now I get this error:

Error
SQL query:
--
-- Indexes for table `oc_customer`
--
ALTER TABLE `oc_customer`
ADD PRIMARY KEY (`customer_id`)

#1062 - Duplicate entry '1' for key 'PRIMARY'
haslamjd
 
Posts: 11
Joined: 08. March 2007 19:40

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby haslamjd » 05. December 2018 17:26

Altrea,

I have been taking apart sections of the original .sql dump file that contain the create database, create table and the code to put the data back into the tables, and creating a new sql file with all that code. Then I Import that new file back into the database using PhpMyAdmin. Seems to be working so far.

Not sure why the big dump file wouldn't complete on its own, but at least I am getting my data back in sections.

Thanks for you replies, I think your queries helped flipped a switch in my brain and helped me to work through this logically. Best wishes to you for your willingness to help!

haslamjd
haslamjd
 
Posts: 11
Joined: 08. March 2007 19:40

Re: PhpMyAdmin database dump file wont restore to fresh Xamp

Postby Altrea » 05. December 2018 18:28

Glad you got it working.
You are welcome
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 147 guests