Thread: database help

Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Default database help

    Hi all, I'm new to the forums but I've been helping my wife with her zencart for a little while now. Actually I'm the admin of the web server. I've been using xampp from apachefriends to run the apache and mysql servers. A new version came out but didn't have an "upgrade" feature. I installed the new version and it overwrote most of the directories. I saved the htdocs folder where the www root is but it seems to have damaged the connections to the databases. phpMYadmin shows that they are all there and OK but I get this error when trying to bring up zencart:

    Sorry!
    There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you.

    Any ideas? Also I tried to re-run the zencart installer but on step 2 or 3 (can't remember) it just gives me a page that says illegal access? I'm stuck and my wife is NOT HAPPY. Any help would be greatly apreciated, thank you.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: database help

    This error:
    There seems to be a problem connecting to our database.......
    indicates that the information for database-connectivity in the /includes/configure.php file is invalid, or the MySQL service is otherwise not allowing connectivity.

    1. is MySQL running?

    2. does the database (DB_DATABASE setting) exist?

    3. are the name/password (DB_USERNAME, DB_PASSWORD) correct? In your MySQL security settings, does that user have access to specified database?

    4. if you go to a command prompt and run "mysql.exe" (from the proper folder), you get a MySQL command prompt. From that prompt, you'll need to enter a username/password for MySQL access. Once "in", type USE MYDBNAME; (replacing MYDBNAME with the database name in your configure.php file DB_DATABASE). Does that give any error? Type SHOW DATABASES; Does that give you any error?

    If you are unable to connect without errors in step 4 above, the problem is in your server configuration.
    If you get no errors, then perhaps you have a configuration problem with the PHP connector to MySQL ... installed by XAMPP. You might try the XAMPP forums or webhostingtalk.com

    5. You could try a fresh install of Zen Cart into a new database and new folder on the server.

    6. What version of Zen Cart are you using?
    What version of XAMPP ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Default Re: database help

    Quote Originally Posted by DrByte
    This error:indicates that the information for database-connectivity in the /includes/configure.php file is invalid, or the MySQL service is otherwise not allowing connectivity.

    1. is MySQL running?
    yes

    Quote Originally Posted by DrByte
    2. does the database (DB_DATABASE setting) exist?
    not sure where to look for that

    Quote Originally Posted by DrByte
    3. are the name/password (DB_USERNAME, DB_PASSWORD) correct? In your MySQL security settings, does that user have access to specified database?
    Are you reffering to the config.inc.php file?

    Quote Originally Posted by DrByte
    4. if you go to a command prompt and run "mysql.exe" (from the proper folder), you get a MySQL command prompt. From that prompt, you'll need to enter a username/password for MySQL access. Once "in", type USE MYDBNAME; (replacing MYDBNAME with the database name in your configure.php file DB_DATABASE). Does that give any error? Type SHOW DATABASES; Does that give you any error?
    I get the error: Access denied for user 'ODBC'@'localhost' <using password: NO>

    Quote Originally Posted by DrByte
    If you are unable to connect without errors in step 4 above, the problem is in your server configuration.
    If you get no errors, then perhaps you have a configuration problem with the PHP connector to MySQL ... installed by XAMPP. You might try the XAMPP forums or webhostingtalk.com
    The xampp forums haven't been much help, I can hardly find anything in english

    Quote Originally Posted by DrByte
    5. You could try a fresh install of Zen Cart into a new database and new folder on the server.
    I kinda tried this, I renamed the install folder back to the original name and changed the permissions for the includes and admin/includes folders and I only get a step or two before it gives me an error. I don't want to loose all her products again, when I perfomed the latest update to the zencart I mistakenly clicked install instead of upgrade and 600 products went bye bye. She's almost got them uploaded again, I'd hate to make her start over.

    Quote Originally Posted by DrByte
    6. What version of Zen Cart are you using?
    What version of XAMPP ?
    Zen Cart is version 1.3.0.2. Xampp is version 1.5.3a

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: database help

    For #2 and #3, I was referring to your /includes/configure.php file.

    You need to find a way to do a backup of the database in order to prevent losing data ... mistakes happen!
    You could try downloading and installing phpMyAdmin from http://phpmyadmin.net You can find installation instructions for it on their website.
    You can find common backup instructions using phpMyAdmin here:
    http://www.zen-cart.com/wiki/index.p...P_THE_DATABASE
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Default Re: database help

    phpMYadmin comes with xampp, it won't let me in either, I must have a user/pass issue, I'll keep looking.

  6. #6
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,036
    Plugin Contributions
    2

    Default Re: database help

    Take a backup of your xampp/htdocs folder
    Take a backup of your xampp/mysql/data folder

    Then uninstall XAMPP, shut down and restart the computer - then install the new version of XAMPP.

    Drop the contents of your backed up htdocs folder into the new one, same with the mysql/data folder - but in both cases don't copy over system files, only folders.

    Vger

  7. #7
    Join Date
    Aug 2006
    Posts
    4
    Plugin Contributions
    0

    Default Re: database help

    I've gotten the databases to work. I ment to post about this but I've been busy. I have to start the mysql server manually throught cmd prompt using the --skip-grant-tables option and everything works fine. I don't really know what that switch does or means but as long as it's not some kinda security breech I'd like to find a way to work that switch into the batch file that the control panel uses when I click start. That way when my computer restarts and xampp starts the services I won't have to be there to manually start the mysql server.

 

 

Similar Threads

  1. "Connection to Database failed" upon install - I think I need database name help
    By jasong1968 in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 30 Nov 2011, 10:50 AM
  2. Replies: 4
    Last Post: 15 Oct 2010, 07:18 AM
  3. Need help transferring database --> Database needs to be loaded onto 2 other sites.
    By Lockerroom in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 25 Sep 2009, 08:27 PM
  4. Replies: 3
    Last Post: 24 Jan 2009, 12:24 AM
  5. Help about error 1146 Table.. SQL database Help
    By falerohydro in forum General Questions
    Replies: 2
    Last Post: 25 Feb 2008, 08:29 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR