instructions for exporting CMSB database

7 posts by 2 authors in: Forums > CMS Builder
Last Post: June 21, 2017   (RSS)

By Deborah - June 20, 2017

Hi. Could someone at Interactive Tools please provide me with the latest step-by-step instructions for exporting for download a CMS Builder database from within the PHPMyAdmin 'Export' interface?

The detailed instructions I have titled "Moving CMS Builder to New Server" seem to refer to an older version of PHPMyAdmin. The options appear to be worded slightly different in my current version of PHPMyAdmin (v4.6.6.) and I want to be sure I have everything right.

~ Deborah

By Dave - June 20, 2017

Hi Deborah, 

I haven't used phpMyAdmin in some time but I think the generic instructions for exporting a MySQL database should work: 
https://www.google.com/search?q=how+to+export+mysql+database+with+phpmyadmin

Because it's an export, you should be able to safely try multiple times without risk.

Which version of CMSB are you using and what are you trying to accomplish? 

Dave Edis - Senior Developer
interactivetools.com

By Deborah - June 20, 2017

Hi, Dave.

I understand how to initiate an export from within phpMyAdmin, but want to be sure I have all custom export settings indicated as needed for CMSB.

I'm going off of older instructions provided on this forum post, that I've printed as a reference for so many years:
https://www.interactivetools.com/forum/forum-posts.php?postNum=2194808

These older instructions stated that we should:
Add DROP / TABLE / VIEW / PROCEDURE / FUNCTION

... but that is not set by default if I simply choose to "Quick" export instead of "Custom" in phpMyAdmin, so I'm wondering what that new instruction set should look like now.

What I'm trying to accomplish is to export anything that could ever potentially restore a given CMSB install in terms of backup needs as well as download the database to install for local testing.

~ Deborah

By Deborah - June 20, 2017

Example in question is a 3.08 version. I'm using the database backup feature you indicated, which creates a downloadable file such as:

www.domain.com-v3.08-20170620-135718.sql.php

Importing that downloaded backup into phpMyAdmin on my local machine, I see the following which initially looks like a success message, but then shows an error:

---
Import has been successfully finished, 49 queries executed. (www.mydomain.com-v3.08-20170620-135718.sql.php)

Error SQL query:
DROP TABLE IF EXISTS `#TABLE_PREFIX#__accesslist`
MySQL said: Documentation
#1046 - No database selected
---
So with that I'm not sure if all is right.

I'll admit I'm new to working locally with database files, so I apologize if I've overlooked something obvious. 

By Dave - June 20, 2017

Hi Deborah, 

If you're just going from CMSB to CMSB, the easiest is to use the builtin backup and restore files.  The files are straight MySQL with the exception that they have that placeholder #TABLE_PREFIX# to represent the MySQL table prefix (which may be different on different servers).

If you want to manually import those backup files, you can just replace #TABLE_PREFIX# with cms_ and it should work fine.

The other option is just to do a generic backup and restore through phpMySQLAdmin.  So long as the MySQL table prefixes match the database prefix that was entered when CMSB was installed then they should appear.

Hope that helps!  Let me know any other questions.

Dave Edis - Senior Developer
interactivetools.com

By Deborah - June 21, 2017

Dave, your tip on renaming the prefix was what I needed.

What was happening is that the prefix assigned to the exported database was not automatically assigned by phpMyAdmin when I imported it, so I did need to replace the #TABLE_PREFIX# with cmsb_ (This is a version 3.08, so I added 'b' to the prefix.)

Appreciate your help!

~ Deborah