Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Aug 2013
    Location
    Australia
    Posts
    7
    Plugin Contributions
    0

    Default Error 1044 when importing DATABASE

    I'm in the process of moving my Zencart from one host to another. I have installed the same version zencart on the new host and am trying to import my database but am getting the following error...

    Error

    SQL query:

    --
    -- Database: `toysahoy_toysahoy`
    --
    CREATE DATABASE IF NOT EXISTS `toysahoy_toysahoy` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;



    MySQL said: Documentation
    #1044 - Access denied for user 'toy18870'@'localhost' to database 'toysahoy_toysahoy'


    Any idea how to overcome this or what I have done wrong? I followed all the steps in...

    http://www.zen-cart.com/content.php?144


    Regards,
    Kiz

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

    Default Re: Error 1044 when importing DATABASE

    Most hosts won't allow you to do a CREATE DATABASE statement from phpMyAdmin.
    That's why the FAQ article tells you to click on the database you're doing a backup of, to select it, before doing the export, so that the create-database statement is not generated in the backup file. That's also why the __DB__ template is advised.

    So, you'll need to use a (safe) text editor to remove that statement from your .sql file before attempting to restore it.
    .

    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 2013
    Location
    Australia
    Posts
    7
    Plugin Contributions
    0

    Default Re: Error 1044 when importing DATABASE

    I've followed the instructions exactly as they were written in the instructions including selecting the database prior to exporting. As my old database is still on my old host, I have tried exporting again over and over and still experiencing the same issues.

    Is it anything to do with my new database name being different to my old one? Old database was toysahoy_toysahoy and I'm trying to import onto new database on new host called toys18870_toystore.

    The last host I attempted to upload the database onto worked fine but had to change host again due to not enough disk space on previous.

    Both new and old server using phpMyadmin 4.0.5

  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,221
    Plugin Contributions
    1

    Default Re: Error 1044 when importing DATABASE

    Not sure if this helps but I had a similar issue, although not the exact same error messages, when moving to a new host, yesterday.

    I found that exporting from within phpmyadmin and then importing to the new host, again within phpmyadmin, did not work (can't remember the errors I received).

    I managed to successfully complete the transfer by exporting the database using cPanel database backup facility and then importing that into the new phpmyadmin. Seemed to work fine.

  5. #5
    Join Date
    Aug 2013
    Location
    Australia
    Posts
    7
    Plugin Contributions
    0

    Default Re: Error 1044 when importing DATABASE

    Quote Originally Posted by simon1066 View Post
    Not sure if this helps but I had a similar issue, although not the exact same error messages, when moving to a new host, yesterday.

    I found that exporting from within phpmyadmin and then importing to the new host, again within phpmyadmin, did not work (can't remember the errors I received).

    I managed to successfully complete the transfer by exporting the database using cPanel database backup facility and then importing that into the new phpmyadmin. Seemed to work fine.
    Thanks Simon. I've tried this and it has solved the problem.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error 1044 when importing DATABASE

    Glad you got it working.

    As I said in my previous post, you could also have simply edited the exported .sql file to remove that problematic statement.
    Quote Originally Posted by DrByte View Post
    So, you'll need to use a (safe) text editor to remove that statement from your .sql file before attempting to restore it.
    .

    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.

  7. #7
    Join Date
    Aug 2014
    Location
    US
    Posts
    5
    Plugin Contributions
    0

    Default Re: Error 1044 when importing DATABASE

    Hey DrByte Mate happily to read your answers... Same issue was with me.

  8. #8
    Join Date
    Nov 2005
    Posts
    165
    Plugin Contributions
    0

    Default Re: Error 1044 when importing DATABASE

    "DrByte, As I said in my previous post, you could also have simply edited the exported .sql file to remove that problematic statement."

    DrByte,
    How do I remove it? In notepad I tried to, imported, queries were successful and YET failed several times as the fresh install was not populated with anything. It looks like this IN the database (without any line break. After copying to Word doc, it has the following line break.):

    /*!40101 SET
    --
    -- Database: `blabla_zenc558`
    --
    CREATE DATABASE IF NOT EXISTS `blabla_zenc558` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    USE `blabla_zenc558`; NAMES utf8 */;

    Should I delete "CREATE DATABASE IF NOT EXISTS `blabla_zenc558` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;"
    or everything between /*!40101 SET....................................*/;

    some syntax messed up?
    Thank you

  9. #9
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error 1044 when importing DATABASE

    To describe the "results" of the import please use more specific language. Failed? How? Error messages or just that there is no change seen on the store side, or is that from looking in phpmyadmin? Importing database data, is there already tables with the same complete table name present? What is the process used to import? Does the old store and new store have the same DB_PREFIX in the includes/configure.php files?

    As for editing the file, should definitely use a text only editor (not word pad as it adds characters as well as messes with line endings).

    As far as the text to remove for that particular "statement" would be everything between /* 40101 through the first occurrence of */ including each of those "symbols". As that complete statement, well, is a complete statement that if not to be processed, should not be there...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Nov 2005
    Posts
    165
    Plugin Contributions
    0

    Default Re: Error 1044 when importing DATABASE

    Thank you mc12345678 for replying.
    Sorry for messed up writing. A week ago I backed up the database of an existing 1.5.4 store, erased zc, installed it back with automatic install, and restored the former db onto the new installed store through phpmyadmin. All done on the same server. So there's no old website, as this process was done repeatedly without problems, like 5 months ago I did the same and had no problem if I remember well. Then this time got the following error. The error shown by phpmyadmin is:

    SQL query:

    --
    -- Database: `sainaasaguud_zenc558`
    --
    CREATE DATABASE IF NOT EXISTS `sainaasaguud_zenc558` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


    MySQL said: Documentation

    #1044 - Access denied for user 'sainaasaguud'@'localhost' to database 'sainaasaguud_zenc558'

    That's it for this install.

    ***********************************
    Then onto another exactly the same fresh test install in different directory www.mongolianshop.com/testdb, I restored the same backedup db from which the following was deleted, by Notepad:

    /*!40101 SET NAMES utf8 */;
    --
    -- Database: `sainaasaguud_zenc558`
    --
    CREATE DATABASE IF NOT EXISTS `sainaasaguud_zenc558` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    USE `sainaasaguud_zenc558`;

    Then my phpmyadmin screen showed this: Import has been successfully finished, 684 queries executed. (sainaasaguud_zenc561.sql)
    No error message.
    Looking at the db tables, the customers and products are populated.
    On the outside, the website http://mongolianshop.com/testdb/ does not show products.

    Its includes/configure shows this:
    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', 'zenkg_');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'sainaasaguud_zenc564');
    define('DB_SERVER_PASSWORD', 'XXXXXXXXXXXXXXXX');
    define('DB_DATABASE', 'sainaasaguud_zenc564');

    Prefix wise what is before underline is the same for the backedup db and the newly automatically created db for both installs.

    -sainaasaguud_zenc564 is an automatically created db together with the new install.
    -sainaasaguud_zenc561.sql is the backed up db.

    Or zenkg_ is in conflict with sainaasaguud_ ?

    What did I mess up?
    Thank you.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Error 1044 when moving database to new server
    By Annie_zaz in forum Installing on a Linux/Unix Server
    Replies: 18
    Last Post: 19 Jan 2016, 03:04 PM
  2. v154 Gateway Time-out error when importing database
    By spawnie69 in forum Upgrading to 1.5.x
    Replies: 15
    Last Post: 29 Oct 2015, 09:31 PM
  3. SQL Error When Importing Database
    By acreativepage in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 4 Nov 2010, 01:49 AM
  4. Dreaded mYSQL 1064 error when importing MySQL 4 database into MySQL5
    By dml311071 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 10 Jun 2008, 05:38 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