Results 1 to 6 of 6
  1. #1
    Join Date
    May 2004
    Posts
    13

    Unhappy Unanswered: mysql newb question (easy)

    I'm a newb to mysql, just installed it a few days ago and I just can't seem to login correctly. to get privileges.

    when i open up
    c:/mysql/bin/mysql.exe
    the current user is "ODBC@localhost" and i have no privilege to use the "mysql" database

    however when i go to
    run : cmd : and type in "c:/mysql/bin/mysql -u root"
    the current user is "root@localhost" and i do have permission to use the mysql database.

    how can i have it so that when i open c:/mysql/bin/mysql to have permissions?

    I know it has something to do with GRANT but i haven't been able to get it right.

    or how can i have it so that when i go to c:/mysql/bin/mysql
    just have the root@localhost open automatically instead of
    "ODBC@localhost"

    what the hell is ODBC@localhost anyway?

  2. #2
    Join Date
    Jun 2004
    Posts
    7
    GRANT ALL PRIVILEGES ON database.* TO user@localhost IDENTIFIED BY 'password'

    where database.* is whatever your db is called, *.* does everything.

    make sure user@localhost is not in quotes. Most likely there is no password, and you can skip everything after the user@localhost.

    Oh, and the odbc@locahost must be your default user, usually I've just seen it as '@localhost' or something like that.

    Hope this helps.

  3. #3
    Join Date
    May 2004
    Posts
    13
    "GRANT ALL PRIVILEGES ON *.* TO user@localhost"
    i type that exact phrase and it return a line with "->"
    and i have no idea what to type

    i just closed it again and fired up under user@localhost and my i got error 1044 saying access denied to "use mysql;"

  4. #4
    Join Date
    May 2004
    Posts
    13
    can anyone else help this is frustrating, i've been on mysql.com all day learning but still no progress

    learned a bunch of other stuff though

  5. #5
    Join Date
    Jun 2004
    Posts
    7
    the -> line means that it is waiting for more SQL query or it's waiting for the terminal character ';'

    put a ; at the end of that and it should work

    Also, when you log into mysql, do the mysql -u root and enter no password, that should be the default.

  6. #6
    Join Date
    May 2004
    Posts
    13
    thanks for the tip,

    is there anyway i can have it so when i double click on the mysql.exe it automatically login's to root

    instead of having to go to run and typing in
    c:/mysql/bin/mysql -u root

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •