Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Dec 2005
    Location
    Oregon
    Posts
    33
    Plugin Contributions
    0

    Default Upgrade via new install- database question??

    I need to upgrade my ZenCart. Now, I am using 1.3.7, but the original install of the cart was pretty sloppy from the person who did it, and worse later because I was new to the whole thing and probably screwed some things up. So, I would like to just do a new installation of 1.3.9, to clean it up and make sure it is all done right to start with. My question is, how best to do this?

    My plan is to-
    1. install the new cart in its own directory
    2. use the backup database function on the old cart to create a backup
    3. use the restore database function on the new cart to restore from the backup
    4. migrate and/or re-do the template customization as needed
    5. re-install any add-ons that I still want to use

    Will this work? Or, is there a better plan that will be seamless and with no downtime for my shoppers? Any thoughts would be appreciated.

    -alkemi

  2. #2
    Join Date
    Jun 2010
    Posts
    13
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    Okay, this is going to be painful at best...

    Over the last couple of years I have done what you want to do a few times. Depending on what add-ons you want to use you may have to learn php.

    To really help you I will need more info.

    What sql? Which server os are you using? The more you can say about the hosted software, or better yet who is the IP? Who is it you are using to host your cart?

    If you are going to use a *nux server and mysql I am willing to help. If you are using a MS server and it's associated databaseI am not able to give you as much help...

    So, write back with this info and we can go from there

    I can tell you that you will need to do a database upgrade with the Zen Cart installer after you import your data from 1.3.7

    I can also tell you that if you plan to move your data the new database name has to be the same. This can be a big problem as a hosting account can have only 1 name per database at a time. In other words, if you plan on using the same server for the new cart you have to delete your old database first.

    I advise you to get an old computer, say a x86 made a few years ago. Build your own server and put your new cart together there first, then move it once it is ready. Need more info on that? I can help you set it up...

    Let us know what you are going to try...

  3. #3
    Join Date
    Aug 2005
    Location
    United Kingdom
    Posts
    457
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    Quote Originally Posted by alkemi View Post
    I need to upgrade my ZenCart. Now, I am using 1.3.7, but the original install of the cart was pretty sloppy from the person who did it, and worse later because I was new to the whole thing and probably screwed some things up. So, I would like to just do a new installation of 1.3.9, to clean it up and make sure it is all done right to start with. My question is, how best to do this?

    My plan is to-
    1. install the new cart in its own directory
    2. use the backup database function on the old cart to create a backup
    3. use the restore database function on the new cart to restore from the backup
    4. migrate and/or re-do the template customization as needed
    5. re-install any add-ons that I still want to use

    Will this work? Or, is there a better plan that will be seamless and with no downtime for my shoppers? Any thoughts would be appreciated.

    -alkemi

    seems ok doing it this way, however i apgraded a little different

    do not delete any databases, most hosting accounts let you create more than one

    also it doesnt matter if you new database has a different name and user details

    1. create a new database and user in your hosting control panel
    2. install new cart in its own directory and point to new database (empty)
    3. install your template making sure its compatible with 1.3.9d
    4. install your addons that you had installed on old site, make sure they are compatible with new version

    at this stage all that is installed should be the same as what is installed on live site

    5. backup the database of your current store by using your hostings phpMyadmin and export your database to SQL format, selecting all tables
    6. using phpMyadmin, select your NEWLY CREATED database that you used to install the new zencart and remove all tables (drop), when database is empty import the SQL you have just created
    7. Backup your server along with your configure.php files from new site
    8. if you have not already removed the zc_install folder, re-run the setup
    9. Select DATABASE UPGRADE - this will patch the database to new version
    10. all your login details will be the same as live site

    test site

    Rob

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Upgrade via new install- database question??

    I would go with Rob on most counts.

    A LOT depends on what was done to customize the original site. You admit to being a bit "sloppy", and that can create a few headaches... particularly if stuff was hard-coded into core files... and now you can't remember which files were fiddled with.

    Hey... I know the feeling... I too am a bit "sloppy" sometimes, but with a large number of clients to look after, I have learned to be very careful and orderly!

    My view would be to look at this differrently to start with (and what Rob says above applies here).

    I would look at the MANNER in which my current site operates, and then determine what customized FUNCTIONS are vital to retain.

    You might, for example, have "hard-coded" a few things that are "nice" to have, but are not critical. It may be easier to dispense with these elements completely.

    Once you have decided what is essential, go see if the add-ons which drive these features are compatible with 1.3.9

    Then. follow Rob's procedure.
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2010
    Posts
    13
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    Hi everyone, Rob and Schoolboy, Checking back in... While dealing with the folks at GoDaddy I was told I would not be able to change the database name... Perhaps I misunderstood, perhaps they did not understand my question?

    In any case I do have the following info:

    The name of a MySQL database consists of a prefix, which is your cPanel username, followed by a "_" sign and the actual database name.

    For example, if your cPanel username is user and you create a database db, the database name will be user_db.

    Thus, if you wish to change the whole name of a database, two changes should be made - the cPanel username and the database name.

    In order for a cPanel username to be changed, we have to terminate the account and re-create it anew with the new username. This means you will lose all the data stored on the hosting account, like files, email addresses, MySQL databases, forwarders, etc.

    This is why it is not recommended to change your username. However, you can easily change the database name suffix by simply creating a new database with the new name and importing the old database in it.

    In other words, if you wish to rename the database user_db to user_joom, you should first create the new database, then import the old database in it and finally add the user to the new database.

    So, now I have looked further I can see it could be done... Just the same I have to wonder how many Zen Cart owners who are not developers would want to attempt to fix all the lost info?

    Perhaps I still don't get it? Is there a way I can change the name of my mysql database AND keep all my data from my old store with the add-on's and so forth? Please tell us where the information is so I may do so as I have several Zen Carts to move and upgrade. It would be great to be able to just creat a new database user name/database name and import the old data, then do my patching.

    Thank you in advance for any links you have available that describes this...

  6. #6
    Join Date
    Aug 2005
    Location
    United Kingdom
    Posts
    457
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    Quote Originally Posted by dizzyfish View Post
    Hi everyone, Rob and Schoolboy, Checking back in... While dealing with the folks at GoDaddy I was told I would not be able to change the database name... Perhaps I misunderstood, perhaps they did not understand my question?

    In any case I do have the following info:

    The name of a MySQL database consists of a prefix, which is your cPanel username, followed by a "_" sign and the actual database name.

    For example, if your cPanel username is user and you create a database db, the database name will be user_db.

    Thus, if you wish to change the whole name of a database, two changes should be made - the cPanel username and the database name.

    In order for a cPanel username to be changed, we have to terminate the account and re-create it anew with the new username. This means you will lose all the data stored on the hosting account, like files, email addresses, MySQL databases, forwarders, etc.

    This is why it is not recommended to change your username. However, you can easily change the database name suffix by simply creating a new database with the new name and importing the old database in it.

    In other words, if you wish to rename the database user_db to user_joom, you should first create the new database, then import the old database in it and finally add the user to the new database.

    So, now I have looked further I can see it could be done... Just the same I have to wonder how many Zen Cart owners who are not developers would want to attempt to fix all the lost info?

    Perhaps I still don't get it? Is there a way I can change the name of my mysql database AND keep all my data from my old store with the add-on's and so forth? Please tell us where the information is so I may do so as I have several Zen Carts to move and upgrade. It would be great to be able to just creat a new database user name/database name and import the old data, then do my patching.

    Thank you in advance for any links you have available that describes this...
    No, you can't rename databases, but then you should never have to anyway, you either wipe them or remove them, there is no need to rename one, its not like a folder, there are lots of files affected on the server for databases

    i create new ones, transfer my data inside, when all done and working remove databases i no longer need

    As for goDaddy they have the weirdest control panel ever for hosting (or did do)

    With Zencart, a way round would be to use different prefixes for install new installation on an existing database without it affecting existing installations, but its not a good thing to do, size of database and how many connections it would have

    BTW alkemi you can ignore this bit i have wrote it was Dizzyfish

    Rob

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Upgrade via new install- database question??

    Quote Originally Posted by dizzyfish View Post
    Hi everyone, Rob and Schoolboy, Checking back in... While dealing with the folks at GoDaddy I was told I would not be able to change the database name...
    No one with any sense hosts an eCommerce site at GoDaddy...

    Sorry to be so brutal, but they are the worst place to host eCommerce.

    I'm not surprised they spin you all this nonsense. A decent host will have proper set-ups, and will allow clients to have SEVERAL databases, all on LOCALHOST.

    This flexibility allows you to create copies of databases (takes 2 minutes in phpMyAdmin) and then to use the COPY to play around with.

    I NEVER do a full upgrade on a live site... I create a full clone in a sub-folder ( the php ) and copy the dbase... and do my initial upgrade there. Using proper C-Panel and phpMyAdmin, a full, working clone takes under 5 minutes...

    BUT... you need a proper host to do this.

    A useless host like GoDaddy simply does not provide the flexibility and efficiency you need.
    20 years a Zencart User

  8. #8
    Join Date
    Aug 2005
    Location
    United Kingdom
    Posts
    457
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    I agree with schoolboy, ive had cheap hosts in the past, never goDaddy (i have had clients with goDaddy) but shared hosting only leads to issues, downtime, hacks, bad support. So now i have part of a dedicated server, and its secure which is what you need if you are running ecommerce sites plus i have full control over everything.

  9. #9
    Join Date
    Jun 2010
    Posts
    13
    Plugin Contributions
    0

    Default Re: Upgrade via new install- database question??

    I have no emotional attachment to GoDaddy and yes, they leave a lot to be desired. I can say much in this regards as well as my dismal view of the guy that has his face all over it, and I could say a lot about his choices. However, in the capitalistic states of america they feel that the level of success proves them right... us poor folk (as we have ethics) as being foolish not to do what needs to be done to crawl on top.

    Be that as it may, I do digress from the matter at hand.

    I am going to ask what must seem to be a really stupid question at this point, but I have to ask it as this is getting less clear as time goes by.

    GoDaddy.com I use as it is what I have been using for 4 years. At the beginning they were cheap, I made a few bucks and got free hosting by reselling my hosted area to my clients. Luckily, my clients had no idea that I did not know a damn thing about PHP, CSS, etc. I was a successful and so called talented graphic designer. I managed to do what needed to be done. Now I have too many people with carts, CMS etc. in my hosted area. And, for what it is worth... godaddy was better than 1and1.com

    Yes, I am looking to share a server. If all goes well soon I will.

    Now, on to my real question and previous statements in regards to mysql database names.

    Am I, or I am not able to take a database called "cart1" from a different server or hosted account that is associated with "zen cart 1" and put it into a new hosted area with a mysql database called "cart3" and in "zen cart 1" everything will work as it did before I moved it? Will it have a new name and keep all my old data that is needed? Or do I have to keep it named as it is to keep all the data in place?

    Thanks, I look forward to your responses, and Schoolboy, I am not at all upset about your views re GoDaddy... You may deride them until the end of time... But, I am stuck with them for now and knowing that an IP can change what and how of installing Zen Cart has caused me to answer the above post as I did. Because it is what I have had to get used to.


    [I]Note to Patriotic Americans[;/I] You may feel the need to say I am being rude by calling this country the capitalistic states of america, please read "A Peoples History of America" by Howard Zinn and get back to me then.

  10. #10
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Upgrade via new install- database question??

    The issue of databases relating to shop-fronts (the code) is quite straight-forward.

    As you know, a zenshop consists of two fundamental elements:

    1. The code files (php and other files - incl images)
    2. The database (set up according to the ZC dbase schema)

    It is important that the database and the code are identical VERSIONS.

    • The NAME of the database is immaterial.
    • The USERNAME and PASSWORD of the database are also immaterial.
    • I'll tell you why in a minute.


    I have (on my dev server) about 50 - 60 zencart stores which are client demo stores. I showcase templates mostly, so they are not active "trading" sites.

    Yet... I have only 10 or 15 DATABASES. In some cases, I have FIVE demo shops linking to ONE database...

    How so?

    The critical files are the two configure.php files...

    This is the ONLY PLACE in the entire php structure of zencart that makes reference to what database the store must connect to...

    ... so, it is quite possible to have FIVE sites with their CONFIGURE paths ALL pointing to the same database.

    -------------------------------------------------------------------

    Now... how does this expand the possibility of error-free upgrades?

    As I said earlier, (because I host on a proper server with a host that understands how to set things up for eCommerce), I actually have UNLIMITED MySQL databases, and can create copies of databases at will.

    This enables me to make a DUPLICATE of any website I manage.

    I duplicate the relevant shop's code files
    I duplicate that shop's database (giving it a different name, of course)

    I then EDIT the configure.php files in the DUPLICATED set of php, to point at the copied database.

    I now have TWO IDENTICAL SHOPS running - but each one using its OWN database. One is the LIVE SHOP. The other is its DUPLICATE which is not live.

    I now do ALL MY UPGRADE work on the duplicate site... and MOST of this will involve the php. I have to get that right and make sure the PHP is the latest version.

    When I am happy that the php in the duplicated site is upgraded, I then (and only then) worry about the database.

    Now remember... the copied site uses a copied database...

    I then (following the upgrade instructions) perform a DATABASE upgrade on the copied site.

    Occasionally there are some niggling PHP errors, but in MOST cases I have flawless upgrades.

    I put the copy site through rigorous testing.

    When I see that everything works I shut down the LIVE site and do a FULL BACKUP of it.

    I then OVERWRITE all the live site PHP folders, files, etc with the upgraded cloned site... (all except the live sites two configure.php files)

    I then have the NEW PHP, pointing at the OLDER (live) database.

    But my test upgrade on the clone went OK, so I now do the database upgrade on the LIVE database.

    QED
    20 years a Zencart User

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 5 Dec 2012, 01:45 AM
  2. Replies: 3
    Last Post: 11 Mar 2011, 10:56 AM
  3. New install (via Fantastico) shows blank pages
    By Lmichael in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 9 Nov 2010, 12:00 AM
  4. Re-install to upgrade to 1.3.8 database query
    By rubear in forum Upgrading from 1.3.x to 1.3.9
    Replies: 12
    Last Post: 18 Mar 2008, 05:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg