Jump to content

Moved DB to new server but can't link up to it


stevebo

Recommended Posts

I have Cubecart installed and working for one of my domains.  I am trying to copy the entire installation over to another domain but am having problems.

I was able to export the product list (and all the tables) from Domain 1 and import it all into Domain 2.  

However the Cubecart admin can't see the new database (nor the old one).  How do I "link" them up?  I looked at global.inc.php and it reflects the new hosts settings.

PS:  I have not moved the files over yet (like product images for example) because I don't want to wholeheartedly overwrite the entire new Cubecart installation and don't really know what's safe to overwrite and what isn't.

Any ideas?

Link to comment
Share on other sites

Did you move the existing database - the actual server or the database to a new database server on the same computer - (like the post subject implies), or did you install another instance of CubeCart and want to connect to a different database, and that different database is on the same database server?

Can't access the (new) database? Wherever this new database is at, you can get to it with phpMyAdmin from within that domain's control panel?

If so, verify that the Database Manager in the control panel says that the domain has permission to access it, and that there is a user given privileges.

Edited by bsmither
Link to comment
Share on other sites

I have 2 domains hosted at the same hosting company, but I believe they are hosted on different machines / IIS servers.

With your help, I was able to get the first domain, Fatpacking.com up and running.  The cart works fine, the database is populated and I can connect to both a test and live gateway for payment.  So awesome!

I have a 2nd domain, Fitpacking.com hosted at the same company but on separate machines (I believe).  Using PHPMyAdmin, I exported the MySQL DB from Fatpacking and then imported the DB into Fitpacking.  I used different database names, usernames/passwords just to make sure I could differentiate between the two installations.

I uploaded a clean Cubecart install into Fitpacking and logged in as administrator.  I had to get tech support at my ISP to get the database connection working.  I had to do this for Fatpacking as well, so I do know it can work.

This gave me a "good" global.inc.php and a fresh admin_xxxxx.php.

When I opened the Fitpacking shopping cart, I expected to be able to see categories and products because they were in the uploaded database.  But I couldn't see them even though I can see the products when browsing through the database.

I figured that images still needed to be transferred and maybe some other connectivity stuff was hiding in the file system so using FTP, I uploaded the entire Cubecart installation from Fatpacking to my machine and subsequently uploaded it to Fitpacking.  I attempted not to overwrite the new admin stuff, global.inc.php and admin_xxxxx.php as well as the admin_yyyyyy directory.

Unfortunately, I still can't see anything other than the "fresh" install with a test category and a test product.  Just for the hell of it, I added another test product.  Although I see it when I visit the store, I don't see it in the Fitpacking database nor the Fatpacking database.  It is absent in both.  I can't for the life of me figure out where cubecart is storing this new product.

Any ideas?

Thanks, Steve

Edited by stevebo
Link to comment
Share on other sites

I started messing around with global.inc.php and now I'm completely locked out.  I don't even know how to re-install at this point since the setup portion has already been performed and I can't even get an admin login screen anyway.


Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'ssilberberg'@'10.3.25.1' (using password: YES) in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 33

Warning: mysqli_options(): Couldn't fetch mysqli in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 35

Fatal error: Access denied for user 'ssilberberg'@'10.3.25.1' (using password: YES) in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 38

 

Link to comment
Share on other sites

For the domain having problems, log in to the hosting provider account's control panel (Cpanel?).

There you will find a tool to construct and configure your database for this domain (this tool is NOT phpMyAdmin).

This tool will tell you the Host:, Database Name:, and authorized UserName(s): and to create passwords for them.

Currently, for some reason, the database server this CubeCart is connecting to does not like the user 'ssilberberg' or its password for either being wrong, or has no authority to use this database.

Link to comment
Share on other sites

Just to complicate things while my ISP is working on the error...

I installed Cubecart on the Fitpacking installation of my new hosting company.  It's obviously still in test mode.  The new Hosting company has an install button on their cpanel so I just installed it.  The install version they have is 5.2.16.

I can successfully install it, but once again even though I have migrated the store over to the new database (referenced in global.inc.php) and can see all the items when I browse in PHPMyAdmin, the new store's admin panel shows only the test category and test product.  Once again, I cannot seem to link up the database with the store.

I must be missing something truly basic.  Any ideas?  I feel like I've come so far, but it never truly works.

Link to comment
Share on other sites

You installed CC5.2.16? When you say you have "migrated the store", you mean to say you did not copyany code from another version of CubeCart overwriting what was already there?

If you can get into that CubeCart's admin, view the Maintenance page, Query Database tab.

Don't do anything on this page - just look at the info shown just above the Query Box. This is the database server host and username.

Next, click Maintenance again, Database tab. The list of tables will show the name of the database as prepended to the table name. Find CubeCart_inventory. How many records does it show?

If there is 1 record, then what you are looking at via phpMyAdmin is not the same database (or database server) as what is in the /includes/global.inc.php file.

Edited by bsmither
  • Like 1
Link to comment
Share on other sites

That was the missing piece!  When I imported the MySQL database from one server to another, MySQL prepended 'cbe' on the imported table names, leaving the existing tables such as CubeCart_Inventory as well creating new tables such as cbeCubeCart_Inventory.  To fix this, I just changed the line in global.inc.php to

      $glob['dbprefix'] = 'cbe';

and everything seems to have worked out.

As an aside, my new hosting company (HostGator) has a 1-click install, which installed version 5.2.16.  I did this because it was easy and seemed to work, but the shopping cart I had already created didn't work.  I had created a shopping cart and tested everything on my old host using a 6.1.13 installation which did not seem to work very well with the v5 database, so I discarded v5 and manually installed v6.  And it somehow seems to work!

Now I just need to go back and try to get the gateway working again on my new installation.

Many thanks for all your help, I am certain I could not have gotten this far without you.

Thanks,

Steve

 

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...