If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql newb question (easy)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-19-04, 11:30
Lyrics117 Lyrics117 is offline
Registered User
 
Join Date: May 2004
Posts: 13
Unhappy 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?
Reply With Quote
  #2 (permalink)  
Old 06-19-04, 11:57
kukusz kukusz is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 06-19-04, 12:04
Lyrics117 Lyrics117 is offline
Registered User
 
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;"
Reply With Quote
  #4 (permalink)  
Old 06-19-04, 23:22
Lyrics117 Lyrics117 is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 06-20-04, 13:45
kukusz kukusz is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 06-21-04, 22:59
Lyrics117 Lyrics117 is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On