Forum Moderators: open

Message Too Old, No Replies

accessing mysql on local machine

         

horseatingweeds

1:04 am on Jul 12, 2007 (gmt 0)

10+ Year Member



I've installed mysql on my local win xp with Apache and php5. I'm trying to learn php and mysql.

The book I am using expects me to know a little more than I do. I've looked around and have found so solution to my problem. I think it's too simple.

How do I access mysql? From the cmd I have:
C:\MySQL\data>mysql>CREATE DATABASE test;
(which returns only)
C:\MySQL\data>
(I then try accessing 'test')
C:\MySQL\data>mysql>USE test;
(this gives me)
ERROR 1045 <28000>: Access denied for user 'ODBC'@'localhost' <using password:NO>

Am I just using the cmd wrong here?

In the my.ini file I have:
#Path to the database root
datadir="C:/MySQL/Data/"

I'll be glad when I'm out of the #*$! stage of this learning process....

physics

5:08 am on Jul 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure (I use a Mac or Linux machines) but try to cd into the mysql bin directory
cd \MySQL\bin
Then type
mysql -uuname -p
to get the mysql command prompt.
You don't want to actually type mysql> ... that is what you should see when you get the command prompt.

horseatingweeds

5:37 am on Jul 12, 2007 (gmt 0)

10+ Year Member



Ok, that clears one thing up. How do I know what my user name is? I didn't add one when I set things up. Just a password.

coopster

2:19 pm on Jul 12, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It's likely still the just the default of "root" then. The MySQL Tutorial [dev.mysql.com] and the mysql — The MySQL Command-Line Tool [dev.mysql.com] are good resources too.

horseatingweeds

6:13 pm on Jul 12, 2007 (gmt 0)

10+ Year Member



Thank you! I didn't realize 'root' was the default. I assumed it was a reference. I'll most likely find more problems so I'm glad webmasterworld has the tutorials listed.

Thanks everyone.