Professional Web Applications Themes

Newbie question re error message - MySQL

Hi all I have installed MySQL 4.0.25 (and PHP 4.4.2.2) on my Windows XP Pro system using IISadmin. PHP is working OK but MySQL shows the MySQL Monitor prompt OK - as follows: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.25-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database printsdb; ERROR 1044: Access denied for user: 'localhost' to database 'printsdb' mysql> As you can see when I try to create a DB I get the error message shown. Also when ...

  1. #1

    Default Newbie question re error message

    Hi all

    I have installed MySQL 4.0.25 (and PHP 4.4.2.2) on my Windows XP Pro system
    using IISadmin. PHP is working OK but MySQL shows the MySQL Monitor prompt
    OK - as follows:

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3 to server version: 4.0.25-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database printsdb;
    ERROR 1044: Access denied for user: 'localhost' to database 'printsdb'
    mysql>

    As you can see when I try to create a DB I get the error message shown.
    Also when trying "show databases;" [without quotes] I get only the Test DB
    shown. I assume this is a permission problem but cannot resolve it. I am
    logged in as root with mypassword. I do have Administartor privelegs on my
    machine and PHP and MySQl are both located on my machine.
    Can anyone help please?

    Thanks

    Plato


    Plato Guest

  2. #2

    Default Re: Newbie question re error message

    >mysql> create database printsdb;
    >ERROR 1044: Access denied for user: 'localhost' to database 'printsdb'
    >mysql>
    >
    >As you can see when I try to create a DB I get the error message shown.
    >Also when trying "show databases;" [without quotes] I get only the Test DB
    >shown. I assume this is a permission problem but cannot resolve it. I am
    >logged in as root with mypassword.
    Are you *SURE* you are logged in as root? Shouldn't the above
    error message say 'rootlocalhost' if you were?
    >I do have Administartor privelegs on my
    >machine and PHP and MySQl are both located on my machine.
    Gordon L. Burditt
    Gordon Burditt Guest

  3. #3

    Default Re: Newbie question re error message

    "Plato" <aqwp51dsl.pipex.com> wrote in message
    news:0ZGdnfYaBIONAYTZRVnyjgpipex.net...
    > mysql> create database printsdb;
    > ERROR 1044: Access denied for user: 'localhost' to database 'printsdb'
    This indicates you are connected to MySQL as the anonymous user. The MySQL
    login is totally separate from the account you use to log in to your Windows
    XP system. Having Administrator privileges for your Windows account means
    nothing to MySQL.

    You can specify the user when running the MySQL tools, for example:
    C:> mysql -u root -p
    Password: ...type password here for MySQL root user, not Windows admin
    account...

    mysql> SELECT USER();
    rootlocalhost

    Read these sections of the manual for more information about accounts and
    privileges:
    [url]http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html[/url]
    [url]http://dev.mysql.com/doc/refman/4.1/en/adding-users.html[/url]

    Regards,
    Bill K.


    Bill Karwin Guest

  4. #4

    Default Re: Newbie question re error message

    Hi

    Thanks all.

    I thought it was solved! But when entering -u root -p; I get the following
    error message:

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 4 to server version: 4.0.25-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> -u root -p;
    ERROR 1064: You have an error in your SQL syntax. Check the manual that
    corresp
    onds to your MySQL server version for the right syntax to use near '-u
    root -p'
    at line 1
    mysql>

    Surely the syntax is correct?

    Any ideas?

    Thanks

    Plato

    "Bill Karwin" <billkarwin.com> wrote in message
    news:dvceah02cg5enews4.newsguy.com...
    > "Plato" <aqwp51dsl.pipex.com> wrote in message
    > news:0ZGdnfYaBIONAYTZRVnyjgpipex.net...
    >> mysql> create database printsdb;
    >> ERROR 1044: Access denied for user: 'localhost' to database 'printsdb'
    >
    > This indicates you are connected to MySQL as the anonymous user. The
    > MySQL login is totally separate from the account you use to log in to your
    > Windows XP system. Having Administrator privileges for your Windows
    > account means nothing to MySQL.
    >
    > You can specify the user when running the MySQL tools, for example:
    > C:> mysql -u root -p
    > Password: ...type password here for MySQL root user, not Windows admin
    > account...
    >
    > mysql> SELECT USER();
    > rootlocalhost
    >
    > Read these sections of the manual for more information about accounts and
    > privileges:
    > [url]http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html[/url]
    > [url]http://dev.mysql.com/doc/refman/4.1/en/adding-users.html[/url]
    >
    > Regards,
    > Bill K.
    >

    Plato Guest

  5. #5

    Default Re: Newbie question re error message

    >I thought it was solved! But when entering -u root -p; I get the following
    >error message:
    What's the command you entered to get the below response?
    It should be something like this:
    >> C:> mysql -u root -p
    >
    >Welcome to the MySQL monitor. Commands end with ; or \g.
    >Your MySQL connection id is 4 to server version: 4.0.25-nt
    >
    >Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    >
    >mysql> -u root -p;
    You don't enter that at a mysql> prompt, you enter it as arguments
    to the 'mysql' command at a COMMAND.COM prompt.

    >ERROR 1064: You have an error in your SQL syntax. Check the manual that
    >corresp
    >onds to your MySQL server version for the right syntax to use near '-u
    >root -p'
    >at line 1
    >mysql>
    >
    >Surely the syntax is correct?
    Gordon L. Burditt
    Gordon Burditt Guest

  6. #6

    Default Re: Newbie question re error message

    Hi Gordon

    I opened mysql monitor and got the following mysql prompt:

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3 to server version: 4.0.25-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>

    At this prompt I entered -u root -p; and got the Error 1064 (below).

    Does this help?

    Thanks

    Plato

    "Gordon Burditt" <gordonb.uiw0vburditt.org> wrote in message
    news:121jm13ri77mreccorp.supernews.com...
    > >I thought it was solved! But when entering -u root -p; I get the
    > >following
    >>error message:
    >
    > What's the command you entered to get the below response?
    > It should be something like this:
    >>> C:> mysql -u root -p
    >
    >>
    >>Welcome to the MySQL monitor. Commands end with ; or \g.
    >>Your MySQL connection id is 4 to server version: 4.0.25-nt
    >>
    >>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    >>
    >>mysql> -u root -p;
    >
    > You don't enter that at a mysql> prompt, you enter it as arguments
    > to the 'mysql' command at a COMMAND.COM prompt.
    >
    >
    >>ERROR 1064: You have an error in your SQL syntax. Check the manual that
    >>corresp
    >>onds to your MySQL server version for the right syntax to use near '-u
    >>root -p'
    >>at line 1
    >>mysql>
    >>
    >>Surely the syntax is correct?
    >
    > Gordon L. Burditt

    Plato Guest

  7. #7

    Default Re: Newbie question re error message

    >I opened mysql monitor

    You're supposed to do that *WITH COMMAND LINE ARGUMENTS*.
    >At this prompt I entered -u root -p; and got the Error 1064 (below).
    Gordon L. Burditt
    Gordon Burditt Guest

  8. #8

    Default Re: Newbie question re error message

    "Plato" <aqwp51dsl.pipex.com> wrote in message
    news:sJadnasI071OPIfZRVnyvwpipex.net...
    > mysql>
    > At this prompt I entered -u root -p; and got the Error 1064 (below).
    You need to supply the options -u root -p as arguments to the command to run
    the mysql monitor, not as a statement after the mysql monitor has opened.

    So the sequence should look similar to this, starting from the DOS shell
    prompt:

    C:\>mysql -u root -p
    Enter password: ****
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 5.0.18-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select user();
    +----------------+
    | user() |
    +----------------+
    | rootlocalhost |
    +----------------+
    1 row in set (0.08 sec)

    mysql>

    Regards,
    Bill K.


    Bill Karwin Guest

  9. #9

    Default Re: Newbie question re error message

    Thanks guys.

    I had tried that at one stage with the following result:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Doents and Settings\Gordon>cd\

    C:\>mysql -u root -p;
    'mysql' is not recognized as an internal or external command,
    operable program or batch file.

    C:\>mysql -u root -p
    'mysql' is not recognized as an internal or external command,
    operable program or batch file.

    C:\>

    MySQL is installed in the default location. You will see I tried both with
    and without the ending ";". I should add that I did not have any of these
    problems when I installed MySQL 3.23.49 so I am inclined to re-install that
    unless there any good reasons for not doing so.

    Does any of this help?

    Plato


    "Gordon Burditt" <gordonb.uiw0vburditt.org> wrote in message
    news:121jm13ri77mreccorp.supernews.com...
    > >I thought it was solved! But when entering -u root -p; I get the
    > >following
    >>error message:
    >
    > What's the command you entered to get the below response?
    > It should be something like this:
    >>> C:> mysql -u root -p
    >
    >>
    >>Welcome to the MySQL monitor. Commands end with ; or \g.
    >>Your MySQL connection id is 4 to server version: 4.0.25-nt
    >>
    >>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    >>
    >>mysql> -u root -p;
    >
    > You don't enter that at a mysql> prompt, you enter it as arguments
    > to the 'mysql' command at a COMMAND.COM prompt.
    >
    >
    >>ERROR 1064: You have an error in your SQL syntax. Check the manual that
    >>corresp
    >>onds to your MySQL server version for the right syntax to use near '-u
    >>root -p'
    >>at line 1
    >>mysql>
    >>
    >>Surely the syntax is correct?
    >
    > Gordon L. Burditt

    Plato Guest

  10. #10

    Default Re: Newbie question re error message

    Plato wrote:
    > Thanks guys.
    >
    > I had tried that at one stage with the following result:
    >
    > Microsoft Windows XP [Version 5.1.2600]
    > (C) Copyright 1985-2001 Microsoft Corp.
    >
    > C:\Doents and Settings\Gordon>cd\
    >
    > C:\>mysql -u root -p;
    > 'mysql' is not recognized as an internal or external command,
    > operable program or batch file.
    >
    > C:\>mysql -u root -p
    > 'mysql' is not recognized as an internal or external command,
    > operable program or batch file.
    >
    > C:\>
    >
    > MySQL is installed in the default location. You will see I tried both with
    > and without the ending ";". I should add that I did not have any of these
    > problems when I installed MySQL 3.23.49 so I am inclined to re-install that
    > unless there any good reasons for not doing so.
    >
    > Does any of this help?
    >
    > Plato
    >
    >
    > "Gordon Burditt" <gordonb.uiw0vburditt.org> wrote in message
    > news:121jm13ri77mreccorp.supernews.com...
    >
    >>>I thought it was solved! But when entering -u root -p; I get the
    >>>following
    >>>error message:
    >>
    >>What's the command you entered to get the below response?
    >>It should be something like this:
    >>
    >>>> C:> mysql -u root -p
    >>
    >>>Welcome to the MySQL monitor. Commands end with ; or \g.
    >>>Your MySQL connection id is 4 to server version: 4.0.25-nt
    >>>
    >>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    >>>
    >>>mysql> -u root -p;
    >>
    >>You don't enter that at a mysql> prompt, you enter it as arguments
    >>to the 'mysql' command at a COMMAND.COM prompt.
    >>
    >>
    >>
    >>>ERROR 1064: You have an error in your SQL syntax. Check the manual that
    >>>corresp
    >>>onds to your MySQL server version for the right syntax to use near '-u
    >>>root -p'
    >>>at line 1
    >>>mysql>
    >>>
    >>>Surely the syntax is correct?
    >>
    >>Gordon L. Burditt
    >
    >
    >
    So, where did you install mysql? What's *your* default location?

    You either need to:
    1. Be in the directory containing mysql.exe, or
    2. Provide the path (absolute or relative) to mysql.exe in your
    command, or
    3. Have the directory containing mysql.exe in your PATH environment
    variable.

    This has nothing to do with the version of mysql installed. Rather, its
    your lack of experience in running from a command prompt.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

Similar Threads

  1. ActivePerl error message? Router script. Please help.Newbie
    By wrreisen2@yahoo.com in forum PERL Modules
    Replies: 28
    Last Post: May 29th, 12:06 PM
  2. total newbie re compilation error message
    By kagnu in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: April 9th, 12:08 AM
  3. Newbie P Error Question
    By Vik Rubenfeld in forum PHP Development
    Replies: 5
    Last Post: July 1st, 03:32 AM
  4. Error 500 newbie question
    By dont mess please in forum ASP
    Replies: 1
    Last Post: October 25th, 04:53 PM
  5. Newbie Question: Error Received
    By David Waz... in forum ASP.NET General
    Replies: 1
    Last Post: July 6th, 06:57 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
  •  

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