Architecture / Installation

Architecture / Installation

error while importing database

posts: 98 Greece

As I have posted elsewhere, I have problems upgrading to 13.1.

While I have a perfectly working 12.3 installation, I have made some attempts to understand how these errors occur. So, wishing not to mess with my working installation, I followed this path: (a) I created a new subdomain (b) added a new databese -lets call it testing_database and (c) I installed tiki 13.1 and connected it with testing_database. So I took a working 13.1 installation, with no errors and no data, of course. Next (d) I exported the database of my 12.3 installation (simple, minimal export) and (e) I imported it to my testing_database. Then I get an error (see picture) and the import stops (testing_database remains blank).

Two questions:
(a) are the above steps ok, regarding my goal to have a working 13.1 installation mirrored to my 12.3 working installation (but please also read PS)?
(b) what is the meaning of the error and why import stops dead?

I understand that another way to do the steps 1-5 is just install tiki 13.1 to my server and connect with existing database without the export - import steps, but I really don't want to mess with my working installation. I mean, if connection of 13.1 with my existing database fails again (see link on top) will I be able to re-connect existing database with a new 12.3 installation, with no problems?

posts: 212

You can not restore because the "testing_database" already has Tiki 13.1 data.  And you can not just truncate the Tiki 13.1 tables and reload from the Tiki 12.3 version of the database because there have probably been changes made to some of the tables.

To do the upgrade, you should delete the entire 13.1 database, then make a complete copy of the 12.3 version of the database as your Tiki 13.1 "testing_database".  (Or backup the Tiki 12.3 version and restore it as the "testing_database").   Then run the Tiki 13.1 install and select to update the database, and Tiki will make the required changes to your "testing_database" tables.


posts: 1559

Hi nicosal,

I want to add some points to Tom Jarvis answer, to make it a bit clearer for you

Your approach to test-upgrade by using a copy of the databaseis absolutely right!

BUT you made it in the wrong order.

So checking out a new Tiki 13.1 in a seperate directory and applying a new subdomain alike "test.mydomain.com" is fine and you can use this directory.

But as Tom said, you have to start your work with a copy of the existing 12.x database. make a dump (or use the dump you already made).

  • FIRST you import the (Ti 12.x) dump to a clean database
    => for that as Tom said, delete all tables of your testing_database
  • SECOND run the installer test.yourdomain.com/tiki-install.php
  • THIRD click through the installer and at about half way you will be asked for the database credential, respectively to use the existing database connection (as you already have a file db/local.php created in your previous attempt).

    Here you are asked to upgrade your database. Do that.

    Finish the installer, lock and enter your Tiki.

Now everything should alright. In case you have custom files like logos, favicons etc. you might want to copy them from your existing Tiki 12.x to the new installion in the appropriate directories.

In case you have files storage neither in the database, nor in the tikiroot (not recommended), but instead outside the tkiroot (recommended), then you have to copy the files directories "sides" your testing installation. Depending on your directory structure, you aswell could use the existing files directory, but I would not recommend to do that, as then you have o way to keep both databases in sync, if you any upload or delete or reallocate files in one of the both installations so better copy all or test witht files.


posts: 98 Greece

Thank you both guys.

To be extra sure with your instructions, what you tell me is

  • create a database
  • import your sql file (the one you had previousley exported from your 12.3 working tiki installation)
  • only then, run the installer etc.


PS2 when I export, I do the "Quick - display only the minimal options", hope this is the correct option (my wiki is not anything fancy, just text - pictures are stored outsider the db)


posts: 1559


Abslotuely, that is the procedure we recommend to you!


Regarding the "Quick minimal option database dump" in the phpMySQL, that should be alright, as long as you stay on the same server, dump and straight away import to an EMPTY! new one.
Anyway: no guarantee.

What I do in such a case: using mysqlclient in the linux shell (on a debian or ubuntu server)

=> Two  very similar lines of code and 2 minutes, given you have aswelll access and the database credentials nearby.

As said: If you have shared hosting without shell access, the above mentioned Quick dump should be ok on the same rver without a problem.




posts: 98 Greece

I am afraid it didn't work. I created a new db, imported, created subdomain, connected with new db, got the same 5 errors as before (see image) and in my new installation I am unable to edit wiki pages (I am able to edit articles, once again).

Something else: during tiki-install.php, in connection page, I am asked if I want to import sql or improved sqli or something like that. Important?

PS. Just read your reply. Yes, I am in the same server.

posts: 103 Wales


I have had this same problem:

"The fact is that after upgrading I am unable to edit any wiki page: The edit page opens but the edit window is blank and I am unable to do anything into it. Also, I don't see the editor buttons etc. The strange thing is that I can edit articles."

I discoveered a workaround:

  1. Put the page into edit mode (see blank edit box)
  2. Save (you now have a blank page)
  3. Click the 'History' button.
  4. Click the 'b' (Rollback) button under the Action column on the second row down (i.e. rollback to the state you were in before you did item 2 above).
  5. Confirm by clicking the "Rollback" button.

When I do this everything is back to working nomally - I have no idea why ;-)

posts: 1559

Hi Dominic,

Which Tiki version you are using?

Maybe a minor upgrade could solve the issue.

Are you using WYSIWYG?



posts: 98 Greece

Dominic said: When I do this everything is back to working nomally - I have no idea why ;-)


You mean that by applying this workaround, the problem is solved once and for all for you and any other user of the wiki, or you have to do it each time you try to edit a wiki page?

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.