Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,455

Results 201 to 220 of 327
14 May 2019, 6:35 PM
#201
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Backup MySQL Database

shrimp-gumbo-mmmhhh:

Hello, I am using this plugin and have a VPS. This is working fine on one of my accounts but is not working on another. Here is the error messages: Running V1.56a works fine on one site but not this one. Any suggestions or thoughts? When I get on phpAdmin from this account this is the database server it is showing:

Server: localhost:3306 same as the working backup site.

Server: lo
Result code: 2
0 => mysqldump: Got error: 1045: "Access denied for user 'website'@'localhost' (using password: YES)" when trying to connect

Failure: The database has NOT been saved.

I'm have the exact same problem. Installed and working on one VPS but not working on another. Both on same hosting provider. Zencart 1.5.6a, php 7.3

14 May 2019, 6:44 PM
#202
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

I suspect the issue you are seeing is that on the site where it doesn't work, your password has shell metacharacters. Create a new password without these, update your configure.php files, and try again.

I thought I solved this problem but further testing showed that my fix was incomplete.

Google "shell metacharacters" if you don't know what these are, or just use numbers and letters (upper and lower case) in your new password.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 May 2019, 7:16 PM
#203
chadderuski avatar

chadderuski

Totally Zenned

Join Date:
Apr 2006
Location:
Dark Side of the Moon
Posts:
986
Plugin Contributions:
0

Re: Backup MySQL Database

Ha! I just spent about 30 minutes working with my host and turns out, as you also just suggested, that it does not like certain characters. In this case, it was my use of the semi-colon ";" ... Once I removed that, everything worked as it should.

Thanks for the reply. Hopefully this will help others that stumble into this problem!

14 May 2019, 7:27 PM
#204
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

I'll do some more testing and see if I can figure out a way to make this work. I think @mc12345678 also had some ideas on how to fix this problem so maybe he will chime in.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 May 2019, 11:30 AM
#205
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

Long ago I did extensive testing with passwords and odd characters on Windows and Unix, and decided they needed different delimiters. I extensively modified this plugin, you may have more luck with that. It's in my Github.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

15 May 2019, 5:56 PM
#206
shrimp_gumbo_mmmhhh avatar

shrimp_gumbo_mmmhhh

Totally Zenned

Join Date:
Jun 2007
Location:
Texas, USA
Posts:
1,436
Plugin Contributions:
0

Re: Backup MySQL Database

swguy:

I suspect the issue you are seeing is that on the site where it doesn't work, your password has shell metacharacters. Create a new password without these, update your configure.php files, and try again.

I thought I solved this problem but further testing showed that my fix was incomplete.

Google "shell metacharacters" if you don't know what these are, or just use numbers and letters (upper and lower case) in your new password.

Yes, the working one is only letters and numbers while the nonworking may have a 1 or 2 shell metacharacters in it.

15 May 2019, 6:04 PM
#207
shrimp_gumbo_mmmhhh avatar

shrimp_gumbo_mmmhhh

Totally Zenned

Join Date:
Jun 2007
Location:
Texas, USA
Posts:
1,436
Plugin Contributions:
0

Re: Backup MySQL Database

It now works after password change.

13 Dec 2019, 6:09 AM
#208
mani avatar

mani

New Zenner

Join Date:
Aug 2008
Location:
Abbottabad, Pakistan
Posts:
62
Plugin Contributions:
0

Re: Backup MySQL Database

I am getting this error when I try to create a backup

0 => mysqldump: Got error: 1045: "Access denied for user 'anythingframedco_usman'@'localhost' (using password: NO)" when trying to connect

How do i fix it?

13 Dec 2019, 11:00 AM
#209
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Backup MySQL Database

mani:

I am getting this error when I try to create a backup

0 => mysqldump: Got error: 1045: "Access denied for user 'anythingframedco_usman'@'localhost' (using password: NO)" when trying to connect

How do i fix it?
For starters, please identify the version numbers for: this plugin, Zen Cart and PHP.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Dec 2019, 11:15 AM
#210
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

mani:

I am getting this error when I try to create a backup

0 => mysqldump: Got error: 1045: "Access denied for user 'anythingframedco_usman'@'localhost' (using password: NO)" when trying to connect

How do i fix it?

This means your database password, as specified in admin/includes/configure.php, has special characters in them. Change it to one without special characters and it will work.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

13 Dec 2019, 1:39 PM
#211
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Backup MySQL Database

swguy:

This means your database password, as specified in admin/includes/configure.php, has special characters in them. Change it to one without special characters and it will work.
Or modify the plugin such that the password is within quotes with the password immediately following the -p (no space to follow:

-p'" . DB_SERVER_PASSWORD . "'

With the possibility of needing to use addslashes() around the password constant.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Jul 2020, 2:40 PM
#212
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Backup MySQL Database

I am receiving the following in error logs after installing Backup MySQL Database plugin v157?
Do you have any idea what is causing the error?

[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant ICON_FILE_DOWNLOAD - assumed 'ICON_FILE_DOWNLOAD' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 439.

[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant IMAGE_RESTORE - assumed 'IMAGE_RESTORE' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 461.

[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant IMAGE_BACKUP - assumed 'IMAGE_BACKUP' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 500.

19 Jul 2020, 6:36 PM
#213
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

You can probably add this to the bottom of the plugin's language file to stop those warnings:

if (!defined('ICON_FILE_DOWNLOAD')) define('ICON_FILE_DOWNLOAD', 'Download');
if (!defined('IMAGE_RESTORE')) define('IMAGE_RESTORE', 'Restore');
if (!defined('IMAGE_BACKUP')) define('IMAGE_BACKUP', 'Backup');

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

20 Jul 2020, 1:18 PM
#214
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Backup MySQL Database

What is the purpose of these errors and future errors warning?

20 Jul 2020, 2:14 PM
#215
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Backup MySQL Database

jodean:

What is the purpose of these errors and future errors warning?
It's part of PHP's evolution. The PHP authors have been taking steps over the past few years to improve performance. Apparently the undefined-constants' checking at runtime was determined to be a bottle-neck.

Those messages are PHP's notice that an undefined constant was found and, for now, it's going to be interpreted as if the code had placed quotes around the constant name. Future versions of PHP will stop during the parsing step and issue an error if an undefined constant is discovered.

14 Aug 2020, 10:22 PM
#216
spawnie69 avatar

spawnie69

Totally Zenned

Join Date:
Sep 2005
Location:
Ocala, FL
Posts:
527
Plugin Contributions:
0

Re: Backup MySQL Database

Can I do a sql backup using this tool on zen cart 1.55 then take that file and place into my new zen cart 1.57 sql /backups folder and restore it?
Any modules need to be updated to 1.57 as well I assume is that correct?
Or is this just the wrong way to upgrade using this tool to in hence upgrade the database?
Thx

15 Aug 2020, 3:00 AM
#217
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Backup MySQL Database

spawnie69:

Can I do a sql backup using this tool on zen cart 1.55 then take that file and place into my new zen cart 1.57 sql /backups folder and restore it?
Any modules need to be updated to 1.57 as well I assume is that correct?
Or is this just the wrong way to upgrade using this tool to in hence upgrade the database?
Thx

Yes, but understand that upon restore of the old database into the new fileset that the database needs to be upgraded using zc_install... ideally also the backup was made when the store was in maintenance mode. Further, to truly retain records of store operation, once you've gotten familiar with what it will take to do the upgrade, then place the live site in maintenance mode, make the backup copy of the database, upload the backup, do zc_install on it, test, place back live

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

5 Sep 2020, 2:13 PM
#218
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Backup MySQL Database

Hi,

Using the latest version from plugins and ZC 1.5.7. I had the password issue which I fixed by removing special characters but now I have the following warning after backing up.

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

The backup is saved and I can restore.

Googling I found https://forums.cpanel.net/threads/cpanel-33473-mysql-dump-process-privilege-error-after-5-7-31-update.675657/

Is this the cause and the fix?

Brent

26 Sep 2020, 1:57 AM
#219
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,453
Plugin Contributions:
4

Re: Backup MySQL Database

Brent:

Hi,

Using the latest version from plugins and ZC 1.5.7. I had the password issue which I fixed by removing special characters but now I have the following warning after backing up.

The backup is saved and I can restore.

Googling I found https://forums.cpanel.net/threads/cpanel-33473-mysql-dump-process-privilege-error-after-5-7-31-update.675657/

Is this the cause and the fix?

Brent

Having similar issue. We moved a site from my VPS to its own VPS. After battling with the new host with the Exec() issue, now I'm getting this error. Customer is using:
ZC v1.5.6c
PHP Version: 7.2.33
MySQL 5.7.31

Any way to fix this?

IDEASLady
IDEAS Creative Studio

Your image... our business!

26 Sep 2020, 12:13 PM
#220
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Backup MySQL Database

In > admin\backup_mysql.php I added the following line ```php
$dump_params .= ' --no-tablespaces';


I have no idea if this is the correct thing to do so didn't post here but as nobody else has replied you could give it a go :smile: