Professional Web Applications Themes

Error loading a database - MySQL

I'm getting the following result by attempting to load a database via 'mysql> source C:\Download\PHPexamples\winestore.data'. This is the result: ERROR: Failed to open file 'C:\Download\PHPexamples\winestore.data', error: 2 Any thoughts? TIA, David...

  1. #1

    Default Error loading a database

    I'm getting the following result by attempting to load a database via
    'mysql> source C:\Download\PHPexamples\winestore.data'. This is the
    result:

    ERROR:
    Failed to open file 'C:\Download\PHPexamples\winestore.data', error: 2

    Any thoughts?

    TIA,
    David

    davids58@gmail.com Guest

  2. #2

    Default Re: Error loading a database

    [email]davids58[/email] wrote:
    > I'm getting the following result by attempting to load a database via
    > 'mysql> source C:\Download\PHPexamples\winestore.data'. This is the
    > result:
    >
    > ERROR:
    > Failed to open file 'C:\Download\PHPexamples\winestore.data', error: 2
    >
    > Any thoughts?

    Error code 2 means the file does not exist.


    --
    Brian Wakem
    Email: [url]http://homepage.ntlworld.com/b.wakem/myemail.png[/url]
    Brian Wakem Guest

  3. #3

    Default Re: Error loading a database

    Thanks Brian...I guess windows had failed to update the explorer window
    I was looking at and showed the wrong directory name!

    In any case, I've moved onto a new error:

    ERROR 1044 (42000): Access denied for user 'david''127.0.0.1' to
    database 'winestore'

    FYI, I'm trying to set up MySQL on my machine so I can work with
    examples in the O'Reilly book I'm reading. I don't recall any step in
    the installation instructions where I had to authorize myself to access
    the database.

    Thoughts?

    Thanks again for your quick responses!
    David

    davids58@gmail.com Guest

  4. #4

    Default Re: Error loading a database

    [email]davids58[/email] wrote:
    > I don't recall any step in
    > the installation instructions where I had to authorize myself to access
    > the database.
    Keep in mind that the MySQL accounts have nothing to do with operating
    system logins or passwords that may exist on your system. MySQL
    accounts are created when you grant privileges to them.

    See the following doc pages for more information:

    [url]http://dev.mysql.com/doc/refman/5.0/en/user-names.html[/url]
    [url]http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html[/url]
    [url]http://dev.mysql.com/doc/refman/5.0/en/adding-users.html[/url]

    Regards,
    Bill K.
    Bill Karwin Guest

  5. #5

    Default Re: Error loading a database

    Bill,

    Yes, I understand the distinction bw the OS id/pw and MySQL. I'm not
    sure where I gave the impression that I didn't but sorry about that.

    I've installed MySQL and configured it (see status listing below). I've
    downloaded a database (winestore.data) which is currently at
    C:\atmp\winestore.data.

    I had added myself (successfully, it seemed) as a user via "GRANT
    SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON winestore.* TO
    david127.0.0.1 IDENTIFIED BY 'secret';". Attempting this now seems to
    fail (ERROR 1044 (42000): Access denied for user 'david''127.0.0.1' to
    database 'winestore').

    Any thought you might have re how I can get this database loaded would
    be greatly appreciated.

    Thanks,
    David

    ============================
    mysql> status
    --------------
    mysql.exe Ver 14.7 Distrib 4.1.9, for Win95/Win98 (i32)

    Connection id: 4
    Current database:
    Current user: davidlocalhost
    SSL: Not in use
    Using delimiter: ;
    Server version: 4.1.9-max
    Protocol version: 10
    Connection: localhost via TCP/IP
    Server characterset: latin1
    Db characterset: latin1
    Client characterset: latin1
    Conn. characterset: latin1
    TCP port: 3306
    Uptime: 12 min 23 sec

    Threads: 1 Questions: 23 Slow queries: 0 Opens: 6 Flush tables: 1
    Open tables: 0 Queries per second avg: 0.031

    davids58@gmail.com Guest

  6. #6

    Default Re: Error loading a database

    [email]davids58[/email] wrote:
    > Bill,
    >
    > Yes, I understand the distinction bw the OS id/pw and MySQL. I'm not
    > sure where I gave the impression that I didn't but sorry about that.
    Sorry, I was making an assumption that you, like so many people, treat
    MySQL accounts as the same as OS accounts. My mistake!
    > I had added myself (successfully, it seemed) as a user via "GRANT
    > SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON winestore.* TO
    > david127.0.0.1 IDENTIFIED BY 'secret';". Attempting this now seems to
    > fail (ERROR 1044 (42000): Access denied for user 'david''127.0.0.1' to
    > database 'winestore').
    > Current user: davidlocalhost
    Well, your current user is davidlocalhost, whereas you granted
    privileges to david127.0.0.1. Those may not be considered the same as
    far as MySQL's privilege tables know. They certainly should be treated
    as equivalent, but apparently they aren't.

    Also I'm not sure if it's relevant, but when I grant, I put quotes
    around both the user and the hostname, for example:

    GRANT ... TO 'david''localhost' ...

    Regards,
    Bill K.
    Bill Karwin Guest

  7. #7

    Default Re: Error loading a database

    Hmmmmm, well, I attempted to grant priviledges using localhost but it's
    still recognizing it as 127.0.0.1.

    ================================
    mysql> GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON winestore.*
    TO davidlocalhost IDENTIFIED BY 'secret';
    ERROR 1044 (42000): Access denied for user 'david''127.0.0.1' to
    database 'winestore'
    mysql> GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON winestore.*
    TO 'david''localhost' IDENTIFIED BY 'secret';
    ERROR 1044 (42000): Access denied for user 'david''127.0.0.1' to
    database 'winestore'
    ================================

    davids58@gmail.com Guest

  8. #8

    Default Re: Error loading a database

    [email]davids58[/email] wrote:
    > Hmmmmm, well, I attempted to grant priviledges using localhost but it's
    > still recognizing it as 127.0.0.1.
    Okay, I just tried a grant similar to yours, and it worked fine.

    Are you sure there aren't any other records in the db or user tables of
    the mysql database corresponding to your 'david' identity? Another
    entry may be taking priority.

    Regards,
    Bill K.
    Bill Karwin Guest

  9. #9

    Default Re: Error loading a database

    maybe I should just uninstall EasyPHP and start over again.....

    davids58@gmail.com Guest

  10. #10

    Default Re: Error loading a database

    I didn't re-install; I just started my attempt this am. Re-reading the
    instructions, it seems that I was supposed to start the session using
    the root username rather than 'david'. Don't know why it would matter
    but it seemed to work just fine under 'root'.

    Thanks again for your help!

    David

    davids58@gmail.com Guest

Similar Threads

  1. Error loading flash! Error-4836
    By snugglebug1105 in forum Macromedia Flash Player
    Replies: 0
    Last Post: February 12th, 05:25 AM
  2. Loading Flash files from a database in cf
    By exey in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: May 16th, 10:24 PM
  3. Loading Database Schema
    By Scott*e in forum Dreamweaver AppDev
    Replies: 1
    Last Post: April 24th, 05:34 PM
  4. Database info not loading?
    By mxc in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: March 18th, 01:43 PM
  5. Loading CLOB data in the database
    By Nikhil in forum IBM DB2
    Replies: 3
    Last Post: September 7th, 03:12 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139