Zen Cart Logo
Forums / Upgrading to 1.5.x / Upgrade Database error: Access denied for username

Upgrade Database error: Access denied for username

Views: 2,220

Results 1 to 13 of 13
12 Jul 2012, 3:03 PM
#1
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Upgrade Database error: Access denied for username

I am upgrading my current 1.3.9h site to v.1.5 In installing the new v.1.5 in a folder on my server (we will call the folder "new") I have edited and uploaded in the includes/config.php and Admin/includes/config.php to include this new path to the new version. I have created a new database in CPanel which we will call newZen15.

When running the installer for v.1.5 when I get to the database setup screen, I enter in the username, password and database name (newZen15) and press Save Database Settings, but receive the error "Database does not exist....Access denied for username....") I have checked the username and password from my existing store and are using these with no results, and have also tried it using my Cpanel username and password with still no luck.

Can anyone tell me where I am going wrong? I have done a previous upgrade a couple of years ago from v1.3.8 to v.1.3.9 and have followed all of my same instructions, but am having this issue this time. Lastly, so you have all of the information, when I first tried to install v.1.5 I had a lower PhPMyAdmin version than is necessary. I had my host upgrade this to v.5.3 yesterday and so it is no longer a problem, but I had created the database newZen15 before this MyPhPAdmin upgrade....I don't know if this has anything to do with the problems that I am experiencing.

Thank you in advance for you help,
Jeff

12 Jul 2012, 3:12 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upgrade Database error: Access denied for username

NWCE:

I have edited and uploaded in the includes/config.php and Admin/includes/config.php to include this new path to the new version.You'll probably appreciate using the new configure.php files created by Zen Cart when you do your fresh install of v1.5, instead of the older format of the 1.3 configure.php files.
NWCE:

I have created a new database in CPanel which we will call newZen15.But, did you grant full rights to a database-user so that the user has permission to access it?

You can find installation instructions, including basic steps on creating databases and stuff, in the /docs/ImplementationGuide.pdf file since Zen Cart v1.5.0

12 Jul 2012, 6:52 PM
#3
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Thank you Dr. Byte for your quick and helpful response! Yes, the DB did not have user permission, and once I did this it was able to connect to the database. The only other problem that I am having is when I do the database upgrade, the newZen15 has my current database imported into it from my Cpanel, and when I run the zc_install to update the database, and press the Update button, I receive a response at the top of the screen that 62 stmts processed and 25 stmts ignored. (My current database is 25MB) I press the Done with Upgradebutton and then delete the zc_install folder, change permissions on configs, and rename my admin. When logged into admin, I do not have any customer history, order history, etc. those items are blank along with much other missing data.

Do you have any idea what has happenned and why the database obviously did not update

I appreciate your help!

Jeff

12 Jul 2012, 8:51 PM
#5
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Thanks for your reply Dr.Byte. Yes I checked my current english.php and it is iso-8859-1 so I will check the other files listed in the link that you gave me later today. Once I change these files and reupload them, should I then run the zc_installer once again in order to update the database...

Thanks again for your help,
Jeff

12 Jul 2012, 10:36 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upgrade Database error: Access denied for username

I suppose you could re-import your old database and then re-run the upgrade again.

13 Jul 2012, 6:48 PM
#7
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Thanks Dr.Byte, I will try this out.

Thanks again for your help,

Jeff

18 Jul 2012, 6:45 PM
#8
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

One other question that I am hoping you can help me with, is when I try to import my current database into my newZen15 database through my cPanel backups it always updates my current database and does not place it into newZen15, even though I rename the database file name to newZen15. I have also tried to import it through myPHPAdmin but it just continues and continues and never finishes. I have talked to my host about this and they say they have fixed it (and imported data into my newZen15 with items missing)but I still have this problem as I want to update it again with more current data. I cannot tell if this is a problem on my host's end or if I am doing something wrong.

If I unzip the current database and change the "database name" on the 4rth line down (database name listed in green from "store139" to "newZen15") and then use the Cpanel Backup/restore will this then import into newZen15 and not my current database on my live site?

Again, I appreciate your help,

Jeff

18 Jul 2012, 7:07 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upgrade Database error: Access denied for username

It would be much simpler if you used either of the following methods, instead of trying to use cPanel backup/restore, since cPanel generally attempts to backup/restore your entire site.

a) use phpMyAdmin to make your backup and then import that backup into your test site using phpMyAdmin. There are various settings in phpMyAdmin that will help make an exported backup easier to import. Best practices outlined in this FAQ article: http://www.zen-cart.com/content.php?144-how-can-i-do-a-database-backup-with-phpmyadmin

b) use the Backup-MySQL plugin to make your backup on your live site, and then copy the SQL file created by the backup into your new site and use the same addon, on the new site, to do the restore. http://www.zen-cart.com/downloads.php?do=file&id=7

18 Jul 2012, 9:06 PM
#10
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Thank you for your reply and for the articles to show me the correct procedure! I really do appreciate your help, and will give these a try!

Thanks once again,

Jeff

19 Jul 2012, 9:25 PM
#11
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Hi Dr.Byte,

When trying to backup my database using the article information that you had linked me to, I was able to do the export in myPhpAdmin, but when trying to import I received the following error messages only a few seconds after pressing the "Go" button. Again, I am not sure if my host is not fixing something on their end, so would you be able to tell me what these error messages mean?

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br /> <b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tr' at line 1
<br /> <b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tried to allocate 128712741 bytes) in <b>/usr/local/cpanel/base/3rdparty/phpMyAdmin/export.php</b> on line <b>143</b><br />

When I "Properties" the zipped folder of the downloaded database the size is 202Bytes, I know that an uncompressed file of the database is 151MB

Thanks again for your help,

Jeff

20 Jul 2012, 8:03 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upgrade Database error: Access denied for username

Those are phpMyAdmin errors. Your server may not be able to handle that approach, in which case the other method I mentioned should be far more effective.

20 Jul 2012, 3:30 PM
#13
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Upgrade Database error: Access denied for username

Thank you so much for your help Dr. Byte!!! The Backup SQL Tool worked perfectly (and quickly) and restored my current database into my new test site database, so I can now continue with getting my mods to work and upgrading to v.1.5.

I can't thank you enough for your excellent and patient customer service!!

Jeff