moving the site - MySQL import error - solved
SOLUTION: I needed to use MySQL import to import the database, not the TYPOlight install tool.
I am moving the TYPOlight 2.8.2 site from one server to another. I copied all files and made a dump of the MySQL database. Then I access /typolight/install.php on the new server and try to import a template (pointing to the MySQL file), I get the followoing error:
Code:
Fatal error: Uncaught exception Exception with message Query error: Column 'protected' cannot be null (INSERT INTO `tl_calendar` VALUES (1,1272639078,'Office Events',226,'1','a:1:{i:0;s:1:\"2\";}','','rss','','source_teaser',25,'http://dsintranet.oed.umn.edu/','',NULL,'','notify_admin','com_default','ascending',0,'','','',''); ) thrown in /swadm/web/ac/system/libraries/Database.php on line 599
#0 /swadm/web/ac/system/libraries/Database.php(546): Database_Statement->query()
#1 /swadm/web/ac/system/libraries/Database.php(162): Database_Statement->execute()
#2 /swadm/web/ac/typolight/install.php(579): Database->execute('INSERT INTO `tl...')
#3 /swadm/web/ac/typolight/install.php(1039): InstallTool->run()
#4 {main}
How could I get around it?
Thanks,
Tonu
Re: moving the site - MySQL import error
When reading the move the contao installation documentation at http://www.contao.org/moving-an-installation.html it shows the best way to make a backup of the MySQL database using phpMyAdmin. I wonder if anyone has the equivalent command using plain MySQL syntax as is displayed in the screen capture? I wonder if my error is due to the wrong options for the MySQL data dump.
Thank you,
Tonu
Re: moving the site - MySQL import error
I decided that the past calendar events are not that important and deleted all the events. I then created a new MySQL dump and tried import it, but I now receive a different error:
Quote:
Fatal error: Uncaught exception Exception with message Too few arguments to build the query string thrown in /swadm/web/ac/system/libraries/Database.php on line 634
#0 /swadm/web/ac/system/libraries/Database.php(537): Database_Statement->replaceWildcards(Array)
#1 /swadm/web/ac/system/libraries/Database.php(162): Database_Statement->execute()
#2 /swadm/web/ac/typolight/install.php(579): Database->execute('INSERT INTO `tl...')
#3 /swadm/web/ac/typolight/install.php(1039): InstallTool->run()
#4 {main}
Since this error doesn't refer to anything that I recognize, I am at a loss.
Re: moving the site - MySQL import error
After re-reading the article about moving contao installation I realized that I need to import the mysql database using mysql or phpMyAdmin instead of Contao install tool. I will give this a try tomorrow.
Re: moving the site - MySQL import error
Yes - do not use the install tool to import the database! Just grab the mysql dump from one server and import it to a database on the new server using phpmyadmin. Then, either edit the db connection variables in /system/config/localconfig.php or by using the install script.