Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/03/2018 : 18:26:34
Upfront, have to admit that Access databases are more my forte. What is the easiest way to copy or clone a SQL database?
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
dbdave
ECT Moderator
USA
10468 Posts |
Posted - 12/03/2018 : 18:47:45
Servelink has a tool in the plesk panel for that. Although currently on their new servers, I don't believe it's working, but I expect they will sort it out soon. I suppose you can take a backup, create a new database and upload the backup to that new instance.
With the current servelink issue, I recently added tables programmatically (and moved data). So the whole thing could be done with code but that's likely a tough way to go about simply cloning a database.
EDIT - I just realized you posted this in the php forum, so I am gonna guess this is a mysql database? If so, I think someone had a script for that, I'll see if I can find it.
Edited by - dbdave on 12/03/2018 18:49:14
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/03/2018 : 21:34:21
It is not on ServeLink. It is on GoDaddy.
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
dbdave
ECT Moderator
USA
10468 Posts |
Posted - 12/03/2018 : 21:39:09
A quick search and I found this
Begin by accessing phpMyAdmin via cPanel .
Select the database you wish to copy (by clicking on the database from the phpMyAdmin home screen). Once inside the database, select the Operations tab. Scroll down to the section where it says "Copy database to:" Type in the name of the new database.
I expect you will have needed to create the new database first.
|
Andy
ECT Moderator
95440 Posts |
Posted - 12/04/2018 : 00:05:26
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 12/04/2018 : 01:33:39
Hi Marshal, Here's the full procedure: 1. Create a new database first in your cpanel using the mysql database wizard, during this procedure you'll be prompted to add a user, make sure you check the 'all privileges' checkbox for that user. Take a note of the databse name, username and password (you'll need these to connect to it) 2. Login to phpmyadmin and click on the database in the left column you want to copy over, and click 'export', the format needs to be sql 3. Save the sql file to your pc 4. Click on the database you created in step 1 in the left column and click on import from the top menu, browse to your saved sql file and click 'go' That's all there is to it.  * Database Migrations and Conversions* * ASP to PHP Cart Conversions**Contact Us**Buy The PHP Capture Card Plugin**Rate Our Services/View Our Feedback*
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/04/2018 : 06:43:29
Thanks everyone. I will let you know how it turns out.
Well that failed. I selected SQL (file type) and export, but it does not give me an option to save anything. It does generate what appears to be a very large text file, but that is as far as it goes.
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
Edited by - Marshall on 12/04/2018 08:04:12
|
Andy
ECT Moderator
95440 Posts |
Posted - 12/04/2018 : 08:29:33
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/04/2018 : 08:34:29
Nope. And it made no indication that it was downloading anything. It just generated a very large text type file.
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
Andy
ECT Moderator
95440 Posts |
Posted - 12/04/2018 : 09:04:57
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 12/04/2018 : 09:45:16
Edited by - Phil on 12/04/2018 10:18:57
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/04/2018 : 10:05:46
I think I may have found the problem. Will get back to you. I FINALLY got it to download, but I get this error -- Table structure for table `abandonedcartemail` -- CREATE TABLE `abandonedcartemail` (
`aceID` INT( 11 ) NOT NULL AUTO_INCREMENT , `aceOrderID` INT( 11 ) NOT NULL DEFAULT '0', `aceDateSent` DATE DEFAULT NULL , `aceKey` VARCHAR( 255 ) DEFAULT NULL , PRIMARY KEY ( `aceID` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;
MySQL said: Documentation
#1050 - Table 'abandonedcartemail' already exists Thoughts? MarshallCENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
Edited by - Marshall on 12/04/2018 10:10:10
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 12/04/2018 : 10:15:11
I would imagine that will be on the import to your new database yes? You are importing it to the correct database I assume? Because that suggests the table already exists. If that's not the case and you're sure you have hosen the correct database to import to, export the database again as an sql file but check the add drop table checkbox before you export it. Then try importing it again.  * Database Migrations and Conversions* * ASP to PHP Cart Conversions**Contact Us**Buy The PHP Capture Card Plugin**Rate Our Services/View Our Feedback*
Edited by - Phil on 12/04/2018 10:17:25
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/04/2018 : 10:40:42
Phil,
I am going to email you.
Marshall
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 12/04/2018 : 10:46:29
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 12/04/2018 : 11:40:05
It is necessary to express my gratitude to Phil. He managed to clone the database thus keeping me from going crazy (or more crazy). Thanks Phil
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
|
|