Trying to import sql file into clean database - getting errors, no Idea how to fix!

Permalink
Concrete5 version 8.5.1
I have remote and local versions of my site.
I have been working on it locally and need to update the remote site. There is an error when I try to import the new SQL file into a newly created database. (screenshot attached)
Please can someone advise?
I am not knowledgable in PHP so if you can help me at all, I'm afraid you'll have to explain as if you were talking to a 3 year old... sorry!

This is what I did last time and it worked perfectly:
1. Cleared cache
2. Used Database Dumper to create an SQL file
3. On the server using cPanel (MySQL) created a new database and added myself as user, adding ALL privileges.
4. Using PHPMyAdmin from cPanel I uploaded and imported the new SQL file (screenshot of settings attached)
5. Then zipped up packages folder (local_site/packages) from local site, uploaded to replace remote packages folder.
6. Updated the database.php file with name of new database (application/config/database.php)
7. Checked through remote site, everything looking fine, happy days, go back to developing on local site.

Thanks in advance,
:)

2 Attachments

AllisonFewtrell
 
IHInc replied on at Permalink Reply
Looks like the SQL dump created by Database Dumper created inserts which exceed the max_allowed_packet setting. Usually the default is 1M which is really close to where the error is in your screenshot.

Either dump the database again with shorter inserts or change that variable through PHPMyAdmin to higher value such as 2M. If you don't have SUPER privileges, though, you won't be able to change that value.
AllisonFewtrell replied on at Permalink Reply
AllisonFewtrell
Hi, thanks for your reply.
I don't know how to increase max_allowed_packet - I found some documentation, but it doesn't describe how to do it. Can't see any handy checkboxes to tick lol.

Could you tell me how would I dump the database with shorter inserts? Database dumper doesn't give any settings.
There is a note on Db Dumper saying
"If you ended up with timeout connection you need to change max_execution_time in your php settings."
But my problem is a different thing is it?

I can't see how to change max_execution_time either, anyway.

Are these things that need to be done on my local setup before I export? Or do they need to be changed on the server? Or both?

Many thanks
A
:)
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
If you zip up your database file and send it to me by Private Message, I will see if I can import it into my dev server and then export it again so I can send it back to you...
AllisonFewtrell replied on at Permalink Reply
AllisonFewtrell
ConcreteOwl - many thanks I will re-export and send through later.
:)
AllisonFewtrell replied on at Permalink Reply 1 Attachment
AllisonFewtrell
Hi, I finally stumbled across the variables pane where I can see max_allowed_packet settings and some other 'max' stuff (screenshot attached). The max allowed packet already looks pretty big...? This is the remote server not my local setup.
Thanks
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
I have sent you a repaired database file by PM.
Let me know how it goes for you,,
AllisonFewtrell replied on at Permalink Reply
AllisonFewtrell
The file imported to my new empty database without any probs.
The site I'm developing locally is far from complete - I wanted it on the server so my client can see progress.
So how do I make sure that the next time I do this, I get a good export of the database?
Do I need to do something to my local site in order to achieve this?
Do you think the problem lies with Database Dumper or is there a problem with my local setup?

Incidentally, although the .sql imported without a hitch, I was then unable to connect this database to the site.
I followed the instructions here:
https://documentation.concrete5.org/developers/installation/moving-a...
I made sure database.php had correct details, updated permissions to folders etc but no joy.

I have this error:
Whoops \ Exception \ ErrorException (E_RECOVERABLE_ERROR)
Argument 1 passed to Concrete\Core\Database\Driver\DriverManager::configExtensions() must be of the type array, null given, called in /home/ts4s3357/public_html/conc8/concrete/src/Database/DatabaseServiceProvider.php on line 29 and defined
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
What are you using to develop locally, wamp, mamp, xamp or something else?
Can you send me the database.php file as a zipped archive..
AllisonFewtrell replied on at Permalink Reply
AllisonFewtrell
I'm using MAMP
I'll PM the database.php in a sec - do you want the local one or the remote one?
Thanks
A
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Send both Allison..
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
The error was caused by a faulty concrete/files folder, I fixed this by replacing the concrete folder from an 8.5.1 download
AllisonFewtrell replied on at Permalink Reply
AllisonFewtrell
That's great - thanks for your help!
I will download the one from the server and replace my local one and hopefully this will be fine.
Cheers
A