HELP> I've deleted the database from phpmyadmin

Hi Guy’s,
I’ve deleted my zen cart local database ( tables ) from phpmyadmin and in trying to rectify the situation I have made it ( probably ) irreversible. I have also played around with the settings etc, ie: permissions etc and somehow managed to stuff all this up as well and now cannot even get into phpmyadmin. I am also getting this message

#1045 - Access denied for user ‘pma’@‘localhost’ (using password: YES)

I have read and re read all the threads here and everywhere else and are unable to solve the problem.

I would like to be able to either re install phpmyadmin or fix the old one so i can still keep and use the old zen cart test one on my local system.

Any help in regards to this will be greatly appreciated.

Thanks in advance, Ash.

is that the case in your localhost or online server?
If its on online server that you can retrieve from the backups because some of the hosting have scheduled to backup the database in certain interval.
Thanks

It’s on my localhost…

In that case, do you have a similar MySQL server on a remote host? If so, just retrieve a backup from the remote host, and restore your local copy from those backups.

If you don’t, and you haven’t bade backups, then you are in a serious pickle. :frowning:

Hi Dave,
I have a mysql and a phpmyadmin on my remote host ( dot easy ) but I am not confident or that knowledgeable in regards to what you have suggested my friend.
Is it as easy as just loging into my dot easy server/host account and FTP-ing across the required data? ( ie : files/tables? ) or do you mean i need to transfer across the mysql program?
I am still very new to this, can you please walk me through, thanks in advance.
Regards, Ash.

NO idea if there is any software for recover the deleted files. That only may help in this case.

Well, if you have phpMyAdmin on your remote server, then the process is simple.

For each database you have on your remote server that you need to retrieve for your local server, just follow these instructions:

1.) Log on to your phpMyAdmin
2.) Select the database you wish to obtain
3.) Along the upper portion of the page, you’ll see “Export” - Click that
4.) Now’s where it gets a bit tricky. Hang on, lemme open my phpMyAdmin:
5.) You should be looking at the phpMyAdmin Export screen. The main part of the page is where we’ll be working. There’s a multiple select box with all your table names. Make sure they’re all selected, by clicking “Select All” just above the box.
(Note: Depending on the phpMyAdmin version your server uses, what you see may be different from what I’m describing. Not to worry; it should be fairly close)
6.) Since you pretty well wiped out your local DB, we’ll need to export both the data AND the structure. Let’s start with the section labeled “Structure”.
7.) The following check boxes should be checked:
a.) Structure (of course. :))
b.) Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
c.) Add IF NOT EXISTS
d.) Add AUTO_INCREMENT value
e.) Enclose table and field names with backquotes
(The rest of the items can be safely ignored, at this point)
8.) Moving on to the Data section, these should be checked:
a.) Data
b.) Use hexadecimal for BLOB
(Again, pretty much ignore the rest of the options in the data section)
9.) Ok, the home stretch! Make sure the check box for “Save as File” is checked. Choose Uncompressed, since it makes it a little easier to import later. Then click the Go button. When the file is saved, the export portion is done.

Now, to import that file. You DID remember where you saved it, right? :wink:
Anyway. I assume you also have phpMyAdmin on your local box. If not, take about an hour and install it, then come back. All done? Cool. Let’s continue.

1.) Log into your local phpMyAdmin.
2.) Select the database you want to restore (sound familiar?)
3.) Along the top should be a link labeled “Import”. Click that.
4.) Browse for that file you just downloaded (and checked for viruses, no matter WHERE you got it. :D), and select it to be imported.
5.) Every option is more or less optional, though I would make sure “Allow interrupt of import in case script detects it is close to time limit” is checked. Hit the Go button, and you’re done!

Hope this helps.

Hi Dave,
thanks for the informative reply, it is much appreciated.
I actually DID have phpmyadmin available on my local, but, I have mangled it, I deleted the database from my local phpmyadmin and then stuffed up the phpmyadmin on my localhost. I am now unable to get into my phpmyadmin local host.
Can I just re-install phpmyadmin? Will it overwrite the old one or will I need to delete the old one before I attempt to re-install the new phpmyadmin?

Cheers mate.

If phpMyAdmin is broken on your local box, then you MAY have to not only re-install it, but also your mySQL, as well. :frowning: I had that exact problem about 6 years ago, and it wasn’t pretty.

A shortcut to a possible fix may be to do the following:

1.) try just re-installing phpMyAdmin.
2.) If that doesn’t work, just stop your mySQL server’s service (I’m assuming this is a Win32 system).
3.) Find the folder where mySQL keeps it’s data files, and just delete the phpMyAdmin folder, and re-install again.
(You can find the data path in your my.ini file, located in your mySQL’s installation directory. the path to mine is:
C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/ )
If this proves unsuccessful, then it’s time to re-install mySQL, UNLESS someone else has a better way to fix it.

Hi,
thanks Dave for the info, I am attempting to do these things, however, my understanding of computer procedures and terms etc just is not up to scratch. I will keep you posted on my journey.

Cheers mate.

Have you touched the database called “mysql” on the affected server in any way whilst trying to get PHPMyAdmin working?

I did delete the older version of sql ( least i think i did anyway, but it is still there on my xampp and still says it’s running ) the reason for deleting the old one was that it was suggested to upgrade from advise I recieved in a forum.

Cheers.

Can someone please walk me through the re installation procedure for re installing phpmyadmin on my local host, I am having all sorts of problems with trying to work this out. I have an old version on there that now longer works as I stuffed it up. Can i just re install phpmyadmin or do i need to re install everyhting ie: xampp, the actual zen cart store etc etc.

Cheers.

Can someone please check for me if i have these two configure.php files matching up and with the correct info, I am new to this and not sure if they are correct or not. ( Below is admin/includes/configure.php )

<?php
/**

  • configure.php
  • @package Configuration Settings
  • @package Admin
  • @copyright Copyright 2003-2007 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: configure.php 6329 2007-05-16 15:36:56Z drbyte $
  • @private
    */

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com
/*

  • URL’s for your site will be built via:
  • HTTP_SERVER plus DIR_WS_ADMIN or
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
    
  • HTTP_SERVER plus DIR_WS_CATALOG or
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    
  • …depending on your system configuration settings
  • If you desire your entire admin to be SSL-protected, make sure you use a “https:” URL for all 4 of the following:
    */
    define(‘HTTP_SERVER’, ‘http://www.example.com’);
    define(‘HTTPS_SERVER’, ‘http://www.example.com’);
    define(‘HTTP_CATALOG_SERVER’, ‘http://www.example.com’);
    define(‘HTTPS_CATALOG_SERVER’, ‘https://www.example.com’);

// secure webserver for catalog module and/or admin areas?
define(‘ENABLE_SSL_CATALOG’, ‘false’);
define(‘ENABLE_SSL_ADMIN’, ‘false’);

// NOTE: be sure to leave the trailing ‘/’ at the end of these lines if you make changes!

// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace … (ie: under the public_html or httpdocs folder)
define(‘DIR_WS_ADMIN’, ‘admin/’);
define(‘DIR_WS_CATALOG’, ‘store/’);
define(‘DIR_WS_HTTPS_ADMIN’, ‘admin/’);
define(‘DIR_WS_HTTPS_CATALOG’, ‘store/’);

define(‘DIR_WS_IMAGES’, ‘images/’);
define(‘DIR_WS_ICONS’, DIR_WS_IMAGES . ‘icons/’);
define(‘DIR_WS_CATALOG_IMAGES’, HTTP_CATALOG_SERVER . DIR_WS_CATALOG . ‘images/’);
define(‘DIR_WS_CATALOG_TEMPLATE’, HTTP_CATALOG_SERVER . DIR_WS_CATALOG . ‘includes/templates/’);
define(‘DIR_WS_INCLUDES’, ‘includes/’);
define(‘DIR_WS_BOXES’, DIR_WS_INCLUDES . ‘boxes/’);
define(‘DIR_WS_FUNCTIONS’, DIR_WS_INCLUDES . ‘functions/’);
define(‘DIR_WS_CLASSES’, DIR_WS_INCLUDES . ‘classes/’);
define(‘DIR_WS_MODULES’, DIR_WS_INCLUDES . ‘modules/’);
define(‘DIR_WS_LANGUAGES’, DIR_WS_INCLUDES . ‘languages/’);
define(‘DIR_WS_CATALOG_LANGUAGES’, HTTP_CATALOG_SERVER . DIR_WS_CATALOG . ‘includes/languages/’);

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define(‘DIR_FS_ADMIN’, ‘admin/’);
define(‘DIR_FS_CATALOG’, ‘C:/Program Files/xampp/htdocs/store/’);

define(‘DIR_FS_CATALOG_LANGUAGES’, DIR_FS_CATALOG . ‘includes/languages/’);
define(‘DIR_FS_CATALOG_IMAGES’, DIR_FS_CATALOG . ‘images/’);
define(‘DIR_FS_CATALOG_MODULES’, DIR_FS_CATALOG . ‘includes/modules/’);
define(‘DIR_FS_CATALOG_TEMPLATES’, DIR_FS_CATALOG . ‘includes/templates/’);
define(‘DIR_FS_BACKUP’, DIR_FS_ADMIN . ‘backups/’);
define(‘DIR_FS_EMAIL_TEMPLATES’, DIR_FS_CATALOG . ‘email/’);
define(‘DIR_FS_DOWNLOAD’, DIR_FS_CATALOG . ‘download/’);

// define our database connection
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_PREFIX’, ‘’);
define(‘DB_SERVER’, ‘localhost’);
define(‘DB_SERVER_USERNAME’, ‘root’);
define(‘DB_SERVER_PASSWORD’, ‘’);
define(‘DB_DATABASE’, ‘zen cart’);
define(‘USE_PCONNECT’, ‘false’);
define(‘STORE_SESSIONS’, ‘db’);
// use ‘db’ for best support, or ‘’ for file-based storage

// The next 2 “defines” are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose “file”, then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the “cache” folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache – leave no trailing slash
define(‘SQL_CACHE_METHOD’, ‘none’);
define(‘DIR_FS_SQL_CACHE’, ‘C:/Program Files/xampp/htdocs/store/cache’);

( Below is includes/configure.php )

<?php
/**

  • @package Configuration Settings circa 1.3.8
  • @copyright Copyright 2003-2007 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    */

/*************** NOTE: This file is similar, but DIFFERENT from the “admin” version of configure.php. /
/
**** The 2 files should be kept separate and not used to overwrite each other. ***********/

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define(‘HTTP_SERVER’, ‘http://www.example.com’);
define(‘HTTPS_SERVER’, ‘https://www.example.com’);

// Use secure webserver for checkout procedure?
define(‘ENABLE_SSL’, ‘false’);

// NOTE: be sure to leave the trailing ‘/’ at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace … (ie: under the public_html or httpdocs folder)
define(‘DIR_WS_CATALOG’, ‘/store/’);
define(‘DIR_WS_HTTPS_CATALOG’, ‘/store/’);

define(‘DIR_WS_IMAGES’, ‘images/’);
define(‘DIR_WS_INCLUDES’, ‘includes/’);
define(‘DIR_WS_FUNCTIONS’, DIR_WS_INCLUDES . ‘functions/’);
define(‘DIR_WS_CLASSES’, DIR_WS_INCLUDES . ‘classes/’);
define(‘DIR_WS_MODULES’, DIR_WS_INCLUDES . ‘modules/’);
define(‘DIR_WS_LANGUAGES’, DIR_WS_INCLUDES . ‘languages/’);
define(‘DIR_WS_DOWNLOAD_PUBLIC’, DIR_WS_CATALOG . ‘pub/’);
define(‘DIR_WS_TEMPLATES’, DIR_WS_INCLUDES . ‘templates/’);

define(‘DIR_WS_PHPBB’, ‘/’);

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define(‘DIR_FS_CATALOG’, ‘C:/Program Files/xampp/htdocs/store/’);

define(‘DIR_FS_DOWNLOAD’, DIR_FS_CATALOG . ‘download/’);
define(‘DIR_FS_DOWNLOAD_PUBLIC’, DIR_FS_CATALOG . ‘pub/’);
define(‘DIR_WS_UPLOADS’, DIR_WS_IMAGES . ‘uploads/’);
define(‘DIR_FS_UPLOADS’, DIR_FS_CATALOG . DIR_WS_UPLOADS);
define(‘DIR_FS_EMAIL_TEMPLATES’, DIR_FS_CATALOG . ‘email/’);

// define our database connection
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_PREFIX’, ‘’);
define(‘DB_SERVER’, ‘localhost’);
define(‘DB_SERVER_USERNAME’, ‘root’);
define(‘DB_SERVER_PASSWORD’, ‘’);
define(‘DB_DATABASE’, ‘Zen Cart’);
define(‘USE_PCONNECT’, ‘false’);
define(‘STORE_SESSIONS’, ‘db’);
// for STORE_SESSIONS, use ‘db’ for best support, or ‘’ for file-based storage

// The next 2 “defines” are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose “file”, then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the “cache” folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache – leave no trailing slash
define(‘SQL_CACHE_METHOD’, ‘none’);
define(‘DIR_FS_SQL_CACHE’, ‘C:/Program Files/xampp/htdocs/store/cache’);

// EOF

Thanks in advance for your assistance, much appreciated.
Ash.

Well, Ash, those don’t look like the config files for phpMyAdmin. Are they, by chance, the config files for your xampp install? Because in my experience, phpMyAdmin config looks more like this:


/* Authentication type */
$cfg['blowfish_secret'] = 'placeBlowfishHere';
$cfg['Servers'][$i]['auth_type']     = 'cookie';
$cfg['Servers'][$i]['user']          = 'someuser';
$cfg['Servers'][$i]['password']      = 'somepass'; // use here your password
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';

/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';

That portion of code lies within config.inc.php in your phpMyAdmin directory (UNLESS your installation of xampp puts it in a different place). I’m not familiar with xampp, or the other “server in a box” packages. I’ve always set my servers up the hard way. :slight_smile:

Hi Dave,
my apologies for not explaining myself properly, those files aren’t the phpmyadmin files they are the configure.php files that I was told if they didn’t match up precisely I would not be able to access the phpmyadmin etc.
Just wanted to check and make sure that it was correct before moving forward on anything else.
Cheers mate.

I’m afraid that I’m going to have to gracefully bow out, then, and hand this problem off to someone more qualified. Best of luck. :slight_smile:

You should be able to install another xampp in a different location, at least last I checked it was self contained. Then copy the /mysql/data/ folders you need to the new one (these are your databases), and whatever you need from the web root.

No worries mate, thanks for your assistance. It’s appreciated.

Cheers.
Ash.