Post by shoo002 » Sat Aug 29, 2009 3:53 pm

Error: Access denied for user 'brockha1_brock'@'localhost' to database ''brockha1_ocdb'
Error No: 1044
SHOW TABLES FROM `'brockha1_ocdb`

i get this error when trying to do a backup from opencart backend

Any ideas.

Stewart

Active Member

Posts

Joined
Sat Jul 04, 2009 9:40 pm


Post by johnhao » Sun Sep 06, 2009 8:30 pm

I also have this problem

Error: Access denied for user

the error log and backup

Buy UK Online Free Shipping Rolling Laptop Desk Buy UK Online Over Bed Table


New member

Posts

Joined
Sat Aug 22, 2009 5:09 pm


Post by Biggen » Fri Sep 11, 2009 4:24 am

Same problem for me. Any ideas??

Edit - Nevermind. Figured it out. The lookup had an extra single apostrophe in the backup.php file.

Newbie

Posts

Joined
Wed Sep 02, 2009 6:31 am

Post by kdmp » Fri Sep 18, 2009 9:18 am

I found this problem a while back and thought I posted it to the forum...I can't find the link to it but here is the solution for those who run into it.

Edit this file:
admin/model/tool/backup.php
Edit line ~16

Code: Select all

$table_query = $this->db->query("SHOW TABLES FROM `'" . DB_DATABASE . "`");
It's hard to see but right after FROM there is ` then ' and then ". Get rid of the second one, the '

Save and away you go.

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by banane » Fri Sep 25, 2009 5:00 pm

thank you for the fix

User avatar
New member

Posts

Joined
Fri Jul 31, 2009 6:30 pm


Post by shoo002 » Wed Sep 30, 2009 2:34 am

Thanks For this Kev,

Helped a lot.

Stewart

Active Member

Posts

Joined
Sat Jul 04, 2009 9:40 pm


Post by nemmon » Thu Oct 15, 2009 6:31 am

Hello, after applying this fix, I wanted to test the restore portion... and this is what I get:
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/home2/public_html/store/admin/controller/tool/backup.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/home2/public_html/store/admin/index.php:57) in /home/home2/public_html/store/system/engine/controller.php on line 23

Please help!

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by kdmp » Sat Oct 17, 2009 10:37 am

What I have suggested to fix the export issue does not interfere with the issue you are having. Seeing you are changing a query string in model/tool/backup.php. You will see near the top that the only thing present for restore is the public function. This merely takes what is in the file and breaks up the information contained in the CSV file you are importing.

I have tried to duplicate your issue by submitting the form without choosing a file. It states that I have imported the file successfully. So it can't be you submitting no CSV file.

I then went looking for the handler for the file upload form. I found this:
admin/controller/tool/backup.php

Code: Select all

if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {			

			$this->model_tool_backup->restore(file_get_contents(@$this->request->files['import']['tmp_name']));
The form itself is coded to upload the file directly to the server. tmp_name contains the path to the temporary file(the CSV file that was just uploaded) that resides on the server. The file should exist on the server in a temporary directory with a temporary name. This sounds to be a server configuration problem. What type of web server are you using? (Linux/Windows)

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by nemmon » Sat Oct 17, 2009 9:02 pm

I am running Linux. It is interesting, because I ran a previous install of OC and I don't have this problem. :-X

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by kdmp » Sun Oct 25, 2009 12:18 pm

But is the line I quoted the same line you have in your backup.php file?

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by thenappybootique » Tue Oct 27, 2009 9:03 am

Im having this backup error and I have doen the fix but it is still saying access denied error 1044. any suggestions?


Posts

Joined
Tue Oct 27, 2009 6:31 am

Post by thenappybootique » Tue Oct 27, 2009 9:10 am

i did it again and it worked :)


Posts

Joined
Tue Oct 27, 2009 6:31 am

Post by ScottBohler » Thu Dec 03, 2009 5:56 am

kdmp wrote:...Edit this file: admin/model/tool/backup.php
Edit line ~16...
Thank you, kdmp. Worked for me too.

- Scott


User avatar
New member

Posts

Joined
Wed Aug 26, 2009 1:45 am
Who is online

Users browsing this forum: No registered users and 23 guests