-
Having problems transferring MySql
I am trying to update to v151 from 1.3.9h. I have a freshly installed version with no changes made and I am trying to transfer MySql before doing anything else and when I go to Import I get this message... "The directory you set for upload work cannot be reached". I know I'm doing something wrong but I have no idea what. Please help!
-
Re: Having problems transferring MySql
I should have said that I have a freshly installed version in a new folder and that my old site still remains
-
Re: Having problems transferring MySql
Quote:
Originally Posted by
doooomed
when I go to Import I get this message... "The directory you set for upload work cannot be reached".
Is that an error message inside phpMyAdmin? If so, then contact your hosting company for help with it, since phpMyAdmin is hosted by them, and not connected to Zen Cart.
-
Re: Having problems transferring MySql
Thank you Doc, I am just awaiting a reply from them. I should also mention, just in case it means something to you that when I am on the page to Import mysql I also have the option to upload directly from my computer, which I did, and it claims to be successful but no changes are made to the site. Maybe I forgot to do something?
-
Re: Having problems transferring MySql
Are you aware of how to handle the MySQL "file"?
Essentially, it is little more than a mass of "organised text".
Technically, a SQL "dump" can be stored as a plain TXT file. I give my backups the file extension .sql so that my editor recognises it. But I could call it "xxxxxx.txt" and it will retain all of its integrity.
But as I said... it's little more than a wad of "organised text".
The only way the "file" will operate, is if it is IMPORTED IN TO A MySQL DATABASE.
Only AFTER it is put into a MySQL database, will it operate as intended.
It looks like you have done step ONE (capture the CONTENT of your original database).
Now step TWO will be to IMPORT it into a MySQL database...
It can't just hang around as a "file"... it needs to be inside a database.
-
Re: Having problems transferring MySql
Hi Schoolboy, I understand what you are saying. I am not sure if I am going about putting the information into MySQL database properly. I think I am but it's not working so probably not. This is my understanding... saved the old db to my desktop, installed the new store into a new folder. I named the new MySQL the same as the old (same login info, same everything) and I thought that would work. Then I tried the export/import method with no luck. I'm pretty sure it's me doing something wrong but I'm pretty lost at the moment as this is the first time I've done this.
-
Re: Having problems transferring MySql
Much will depend on how you made the "backup" or "copy" from the ORIGINAL database.
You may have saved it as a ZIP file or something.
Tell me what your database "file" is called?
Is it something like " XXXXXXXX.sql "
What file extension does it have? (.sql ... or .txt .... or something else ???)
-
Re: Having problems transferring MySql
-
Re: Having problems transferring MySql
How "confident" are you with working in phpMyAdmin ???
There is another way to do this WITHOUT having to manually copy the database.
In phpMyAdmin, you can get the system to copy a database for you (if you are working off the same location).
-
Re: Having problems transferring MySql
Not much knowledge in that department but as long as it won't bother my active site I'd be willing to try!
-
1 Attachment(s)
Re: Having problems transferring MySql
It's relatively straightforward, but great care needs to be taken in phpMyAdmin... mistakes are not forgiven...
First step is to create a new MySQL database in your C-Panel admin area.
I trust you know how to do this? Most C-Panel interfaces have a video tutorial for this.
Even so, you can create a NEW database - call it " zentwo " if you like... it does not matter what you call it.
Then ASSIGN the current USER to that new database, and give the user all privileges.
...
Now you have a NEW, (but empty) database, called zentwo . It will have a USER with all privileges.
--------------------------------
Now, go back to C-Panel MAIN SCREEN, scroll down to database management icons and click phpMyAdmin.
When you get to phpMyAdmin main screen it will load a LEFT MENU and a RIGHT FRAME.
In the LEFT MENU you will see all current databases, of which the following should be there:
youraccount_zc1
youraccount_zentwo
(where "youraccount" is your host account prefix)
Click on the original database --- zc1 database to open it. The screen will refresh and show the tables down the left column and the structure in the right frame.
At the TOP of the right frame is a menu. Click the OPERATIONS link.
You will see this:
Attachment 11968
When you have filled in as shown, click GO.
A new (identical) database will be create inside "zentwo ".
NOW, you copy your FILES to a sub folder.
You then edit the CONFIGURE.PHP FILES to point the copied system to the NEW database !!! (This is very important).
-
Re: Having problems transferring MySql
I'll check right into that...Thank you!
-
Re: Having problems transferring MySql
Okay, I follow everything up until "NOW, you copy your FILES to a sub folder." Which files do I copy to a sub folder? Where does the sub folder go? Thanks!
-
Re: Having problems transferring MySql
OK... so you have a DUPLICATE DATABASE (with a different name - but it is an identical COPY of your original database).
Now, you need to make a DUPLICATE of all the zencart FILES.
(You do not perform an upgrade on a LIVE SITE... you need a full COPY of the site, and the upgrade is done on the COPY).
If you wait a few minutes, I will post some diagrams.
-
3 Attachment(s)
Re: Having problems transferring MySql
Your MAIN ROOT FOLDER will look like this:
Attachment 11969
Create a NEW FOLDER - mine is called zen_upgrade.
Attachment 11970
COPY all your zencart files and folders INTO this zen_upgrade folder. You now have a COPY of your files in a sub-folder called zen_upgrade.
Attachment 11971
NOW YOU NEED TO EDIT THE CONFIGURE.PHP FILES...
The important areas are:
define('DIR_WS_CATALOG', '/zen_upgrade/');
define('DIR_WS_HTTPS_CATALOG', '/zen_upgrade/');
and places like this:
define('DIR_FS_CATALOG', '/home/youracct/public_html/zen_upgrade/');
And the DATABASE SETTINGS
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'youraccount_username');
define('DB_SERVER_PASSWORD', '}&^*7867TYt');
define('DB_DATABASE', 'youraccount_zentwo');
In other words GET THE PATH RIGHT... TO THE DIFFERENT FOLDER...
Wherever you need to place the PATH, make sure you put the new foldername in that path...
-
Re: Having problems transferring MySql
Okay! I have all that done but... I am still showing no products or customer/order records in the new store. I triple checked everything you told me...any idea? Thanks!!!
-
Re: Having problems transferring MySql
Quote:
Originally Posted by
doooomed
Okay! I have all that done but... I am still showing no products or customer/order records in the new store. I triple checked everything you told me...any idea? Thanks!!!
You should be seeing two identical websites for:
http://www.your-website.com
and
http://www.your-website.com/zen_upgrade
If you are not seeing identical sites, you have not followed procedures correctly.
-
Re: Having problems transferring MySql
I have no doubt that I did something wrong :dontgetit I'm curious about something before I go ahead and try again. I have a store I built from scratch that has been basically finished minus the database. I changed the config files to point to my current/copied database. Should that have worked? When I did that my template switched back to default but I was able to change it back and everything looks the same but again no database...?
-
Re: Having problems transferring MySql
I fear you are too "uncertain" of how the whole structure hangs together. You say you have "no database"... If this were the case, the site would simply not function at all.
A working zencart store has:
1. Code Files
2. A MySQL Database
The two work hand-in-glove . There might not be any CONTENT in a database, but there is still a database... Zencart will simply NOT FUNCTION if the files and an associated database are not fully linked to each other.
----------------------------------------------------------------------------
Now...
You wish to UPGRADE.
To do this safely, the upgrade needs to happen on a COPY of the site.
SO...
You need a COPY OF ALL THE FILES
You need a COPY OF THE DATABASE
When you have these COPIES, you adjust the configure.php files of the COPIED VERSION to point the copy to the new database.
You should NOT BE MAKING ADJUSTMENTS to the ORIGINAL SITE, so do not tinker with the ORIGINAL CONFIGURE.PHP FILES...
You do not want to be touching that stuff...
You work ONLY in the copied stuff.
If you are not getting an identical site showing (in every respect) on your two URL paths, then perhaps it's time to call in some help.
Whatever you do, do not tinker with the original site !
-
Re: Having problems transferring MySql
No Worries, I'm not touching the original site. I misspoke earlier, I have a database apparently as the site is functional but it shows no products or customer info/orders.
Just for my information, if I had a fresh install and made no changes at all except for pointing the config pages to an existing database, would that work or would other changes need to be made? I ask this because I have all my overrides and such neatly tucked away and I could easy get a fresh install turned into a functional store in a fairly short amount of time.
If not I am going to go ahead and re-do everything you laid out for me to see if I can find where I messed up.
Thank you for your help and patience!
-
Re: Having problems transferring MySql
Quote:
Originally Posted by
doooomed
No Worries, I'm not touching the original site. I misspoke earlier, I have a database apparently as the site is functional but it shows no products or customer info/orders.
As I said... the first thing you should see after creating a CLONE site, is a site that is absolutely identical in every way to your ORIGINAL site.
Afterall, the new site is an exact COPY.
If you are not seeing an IDENTICAL SITE (identical in EVERY WAY - including customers, products, orders, ezpages...) then you have not made the CLONE correctly.
Quote:
Originally Posted by
doooomed
Just for my information, if I had a fresh install and made no changes at all except for pointing the config pages to an existing database, would that work or would other changes need to be made? I ask this because I have all my overrides and such neatly tucked away and I could easy get a fresh install turned into a functional store in a fairly short amount of time.
Many customisations that site owners put in place over the months and years are a COMBINATION of code changes AND database changes. For example, when you add a CUSTOM template, the "instruction" to load that template and all of its settings (eg: sideboxes) are stored in the database.
So if you do a "fresh install", then link that to another database, there will be inconsistencies... How will the "fresh install" cope with trying to apply a template, when the custom files for that template are not there - but the settings in the database are instructing the system to apply that template...
Quote:
Originally Posted by
doooomed
If not I am going to go ahead and re-do everything you laid out for me to see if I can find where I messed up.
Just remember to NOT TOUCH the original files, or tamper with the original database.
-
Re: Having problems transferring MySql
Thank you Schoolboy! :clap: Worked like a charm!
-
Re: Having problems transferring MySql
Identical sites, but my issue is not the copying, rather the version.
My site: Fresh ZC 1.5.4 installed using CPanel & Installation.
Copied database as per sequence above. All copied data shows in the new database.
Changed the configure.php file to point to the original database username and password, and this is where I think my problem lies.
-
Re: Having problems transferring MySql
Quote:
Originally Posted by
Parafanaylya
Identical sites, but my issue is not the copying, rather the version.
My site: Fresh ZC 1.5.4 installed using CPanel & Installation.
Copied database as per sequence above. All copied data shows in the new database.
Changed the configure.php file to point to the original database username and password, and this is where I think my problem lies.
Posted before completing my issue.
When the changes have been made to the configure.php files, the database no longer reflects any product.
-
Re: Having problems transferring MySql
Quote:
Originally Posted by
Parafanaylya
Posted before completing my issue.
When the changes have been made to the configure.php files, the database no longer reflects any product.
Moving my please help me to here