WeaponX 0 Report post Posted August 10, 2005 (edited) Hi, I have a forum with over 1000 members now and want to use that to do my testing. I'm using SMF 1.1 beta 3.Will it work if I download the full database backup from my other webhost (not Xisto) and import it directly into Xisto? I know that it will always append a prefix to the database name. I just want to install a test version of SMF in Xisto and do all my modding there. How can I change all the prefixes to the one I have in Xisto (assuming that it's required)?Thanks. Edited August 10, 2005 by microscopic^earthling (see edit history) Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted August 10, 2005 Usually when you take a db dump with mysqldump it writes out the database and table structures as well. Now SMF uses just one database with multiple tables - right ? So once you get the dump file, simply remove the CREATE DATABASE smfdb syntax found in the top few lines. Next install SMF on asta - that'll create the required table structures. Now simply import your dump using phpMyAdmin and that should do the trick. Usually, all CREATE TABLE syntaxes created by mysqldump also includes the DROP & IF EXISTS clauses, which means, if your table is found to exist, it is dropped and a new table is created and populated with data. This won't affect you adversely in any way as your SMF tables will be blank anyways. The above process should create a mirror copy of the mysql tables on your earlier host. Regards, m^e Share this post Link to post Share on other sites
WeaponX 0 Report post Posted August 10, 2005 Thanks for the reply m^e. I'm not sure how to use mysqldump from the command line, so I usually get it directly from my SMF Forum backup section. I don't see that though. This is what I have: # ========================================================== # # Database dump of tables in `Edited_Prefix_yabb2` # August 10, 2005, 11:02:17 AM # # ========================================================== # # Table structure for table `yabbse_attachments` # DROP TABLE IF EXISTS `yabbse_attachments`; CREATE TABLE `yabbse_attachments` ( ID_ATTACH int(10) unsigned NOT NULL auto_increment, ID_THUMB int(10) unsigned NOT NULL default 0, ID_MSG int(10) unsigned NOT NULL default 0, ID_MEMBER mediumint(8) unsigned NOT NULL default 0, filename tinytext NOT NULL default '', size int(10) unsigned NOT NULL default 0, downloads mediumint(8) unsigned NOT NULL default 0, attachmentType tinyint(3) unsigned NOT NULL default 0, width mediumint(8) unsigned NOT NULL default 0, height mediumint(8) unsigned NOT NULL default 0, PRIMARY KEY (ID_ATTACH), UNIQUE ID_MEMBER (ID_MEMBER, ID_ATTACH), KEY ID_MSG (ID_MSG) ) TYPE=MyISAM; # # Dumping data in `yabbse_attachments` # INSERT INTO `yabbse_attachments` .....etc... I get that from the top. This keeps going on with other thinks like dumping ban_groups, ban_items, etc. So how do I change the CREATE TABLE? For all of them. Also, I have to use the same folder/path for my SMF install at Xisto right? Because I see a lot of these entries: /home/my_account_name/public_html/bb/........just means any other folders listed there (too much for me to list). I did the full database backup of SMF by checking these: Save the table structure. Save the table data. (the important stuff.) Compress the file with gzip. I downloaded here at my work computer and it's only 8MB in size. I assume this is because it's compressed. Once I unzipped it, it's 40MB which is the filesize download I get at home. How can I download the 8MB compressed file at home? I don't know why this happens. All my settings are the same and I'm using Firefox at home and work to download this. Still work could get 8MB backup, but at home I could only get the uncompressed version. Share this post Link to post Share on other sites
Houdini 0 Report post Posted August 10, 2005 If you have a good editor with search and replace then just do a replace all "DROP TABLE IF EXISTS" instances or even better if you editor allows you to veiw each instance of the found text then you can just take your cursor and remove each one instance and the following text after itOr when you go to phpMyAdmin make sure when exporting your database as an SQL file that the Add DROP TABLE box is not checked it will create a file without you having to edit anything, if you need a screenshot leave me a PM and I will do that. Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted August 10, 2005 See ideally you needn't worry about importing this data directly into your new copy of SMF. If both the versions on your two hosts are identical then table structures will also be 100% same. in that case - the DROP TABLE IF EXISTS followed by CREATE TABLE will just recreate your blank tables and then populate them with the data from your older board. However problems arise - when you already have a couple of posts in your new board... The new posts will be indexed with say for example 1...2...3...4...etc. whereas the posts in your old board will also start with indexes of 1..2..3..etc . When you try to import this data into the new board - there will be a clash of primary key indexes and phpMyAdmin most likely will refuse to import the data due to Duplicate Primary Keys. I'd advice you to start off with a clean copy of SMF and simply import the old data into it and then carry on with new posts. As I said, it wouldn't matter if your new SMF has already created the tables - as long as both the versions are same.The paths of the board on either host is irrelevant here - coz the path is not related to your mysql db. As long as SMF knows which database to store it's data in, it's all fine - and that data as far as I remember is stored in a separate config.php file, which wouldn't come in the way of your data importing in any way. All the best Share this post Link to post Share on other sites