Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to MySQL

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
I'm running mysql on windows and I would like to connect to the database by typing mysql (only) and not mysql -uroot -proot. This works just fine from my linux and i cant figure out why it wont work on my windows box. I get the following error:

C:\>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

Do I have to modify my.ini?

Also, I would like to grant the user phpuser access to a particular database. How can i do this?

Thanks in advance, i know these are easy questions, but i'm currently working on 1,000,000 things at the moment.

Cheers!

 
for part one of your question make a windows batch file and call it something like sql.bat

in the put in the full mysql login command.

Mine has this in it

cd c:\mysql\bin
mysql -u me -pmypassword

make sure the dir where the batch file lives in in your path and you can then simple type sql and you're in.

for part two you need to read the manual for creating accounts and grant that user access to that db from that host.

 
Cheers,

I will create the *.bat file and read the manual for grant permissions.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top