Jump to content

[Resolved] Getting the .sql linked to the webshop


Recommended Posts

Hello,

I've googled around but I could not find an answer.

I've made a backup of my webstore, files and sql file were made successful. However if I do upload the sql file with phpMyAdmin its somehow NOT linked at all to the store.
So I wonder how to upload a backup manually.
Any help?

I use the newest cubecart version.
Would be fine if someone could help it out. so that we don't need to rebuild it all again.

Link to comment
Share on other sites

Welcome nagashiwa! Glad to see you made it to the forums.

The SQL file that the backup generates can be used to recreate the database.

What it cannot do is recreate the user accounts managed by the database server. User accounts are generally provided to you via your hosting account's control panel.

The database account user/pass is then entered into the /includes/global.inc.php file. (A sample file, global.inc.php-dist, contains the variables to hold the data).

During the process of freshly installing CubeCart, as best I can tell, there does not include the opportunity to restore the database from that backup.

Link to comment
Share on other sites

I've never used the sql to restore a website from a backup - but NO - you do NOT lose your website if you change hosts, as long as you have a good backup. It's the database USER ACCOUNT that you have to know the login/password to. They have to be added to the global.include.php file - so CC knows how to talk to the database.

Link to comment
Share on other sites

I would even hazard a guess that the hosting account's control panel has the means to rebuild a database from the SQL file generated by CubeCart. If not that, then certainly phpMyAdmin will rebuild the database from the SQL file.

I think we need to clarify what is meant by "if I do upload the sql file with phpMyAdmin its somehow NOT linked at all to the store." I conclude you did have phpMyAdmin recreate the CubeCart database at your new host. What remains is to configure the global.inc.php file so that CubeCart (installed at your new host) knows where it is, what it is named, and the user/pass to access it.

Link to comment
Share on other sites

This is from the EXAMPLE global.include.php-dist file:

<?php
/**
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2014. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  [email protected]
 * License:  GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
 */
$glob['dbdatabase']     = '';            // e.g. cubecart
$glob['dbhost']         = '';            // e.g. localhost (Can be domain or ip address)
$glob['dbprefix']         = '';            // e.g. store_1_ prefixed on to table names
$glob['dbusername']     = '';            // username that has access to the db
$glob['dbpassword']     = '';            // password for username
$glob['installed']         = '0';            // set to 1 if store is installed
$glob['adminFolder']     = 'admin';        // Change this if you have changed the admin folder name
$glob['adminFile']         = 'admin.php';    // Change this if you have changed the admin file name
$glob['cache']         = 'file';    // Cache in use can be (apc, file, memcache, memcached, xcache)

 

For the simplest situation - you would not have a prefix or have changed the admin naming, and you may not be using memcache (host will know) - so it might be file.
?>

Link to comment
Share on other sites

That's the thing this all isn't inside  at all.

 

$glob['dbhost']         = '';            // e.g. localhost (Can be domain or ip address)
$glob['dbprefix']         = '';            // e.g. store_1_ prefixed on to table names
$glob['dbusername']     = '';            // username that has access to the db
$glob['dbpassword']     = '';            // password for username
$glob['installed']         = '0';            // set to 1 if store is installed
$glob['adminFolder']     = 'admin';        // Change this if you have changed the admin folder name
$glob['adminFile']         = 'admin.php';    // Change this if you have changed the admin file name
$glob['cache']         = 'file';    // Cache in use can be (apc, file, memcache, memcached, xcache)

 

Oh wait I did got the wrong file

Link to comment
Share on other sites

I did try but I don't get what to edit to this :

$glob['dbprefix']         = '';            // e.g. store_1_  prefixed on to table names

 

also maybe

$glob['cache']         = 'file';    // Cache in use can be (apc, file, memcache, memcached, xcache)

'file' I think its not the righ tnow

 

 

whatever I try it doesn't work.

Link to comment
Share on other sites

My database tables begin CubeCart_ If yours does as well, you don't have a prefix. If your table names begin with something before CUbeCart_ that's the prefix you need to add to global.include.php.

The one I gave you is the EXAMPLE. You will make your edits to global.include.php.

Your host will know which one for the cache. I'm not sure if you can just leave off the $glob['cache'] line and let CC figure that out or not. But since you're not getting into CC as it is, I don't guess it could hurt to try leaving that line off until you hear back from your host.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...