MySQL - PHP

I am working on a project.  It requires me to connect to the MySQL server from the wamp.  I am not sure what I need to do get started with this process.  I was told that you can go to the MySQL server and create the database.  Well, I started with the command mysql -h localhost -u bparson -p.  I got this output.  

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

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

C:\Users\student>
assaultkittyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Open your browser and goto "http://localhost" and you should see the WAMP home page.  One of the links there is for 'phpmyadmin' which you can use to manage your MySQL.  MySQL under WAMP is not registered as a system program so I don't know if you can use the 'mysql' command line.
0
assaultkittyAuthor Commented:
DaveBaldwin,
At phpmyadmin, localhost@root is used to manage MySQL.  According to my book, I am to use the mysql command line.  
0
Dave BaldwinFixer of ProblemsCommented:
When you are using WAMP, the WAMP manager program runs MySQL, not Windows, so 'mysql' command is not on the path.  I suppose you could put it there.  On my copy of WAMP, I have go to the bin directory for the version of MySQL that is running which is "C:\wamp\bin\mysql\mysql5.1.36\bin" to run 'mysql' on the command line.  There I can use a user that has 'localhost' privileges to login.

Actually, it's root@localhost.  And if you run 'mysql' as above, you can login as 'root'.  I have set a password on my server so I have to use "mysql  -uroot -p".
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

assaultkittyAuthor Commented:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\student>C:\wamp\bin\mysql\mysql5.5.16\bin
'C:\wamp\bin\mysql\mysql5.5.16\bin' is not recognized as an internal or external
 command,
operable program or batch file.

C:\Users\student>

C:\Users\student>

C:\Users\student>

C:\Users\student>

This is what I got for my output.
0
Dave BaldwinFixer of ProblemsCommented:
No, you need to do "cd C:\wamp\bin\mysql\mysql5.5.16\bin" and then type 'mysql  -uroot -p'.  The 'mysql' program is not in the 'path' so you need to be in it's directory to run it.
0
assaultkittyAuthor Commented:
Thank you. Thank you.  I am happy.  One more question.  The mysql console.  Where does that come into play.  P.S. I do not need a password.
0
Dave BaldwinFixer of ProblemsCommented:
I don't know what you mean by "mysql console".  Using 'root' without a password is ok on a machine that no one else uses.  It can be critical on a machine that others have access to.
0
assaultkittyAuthor Commented:
the is a mysql console.  When you go to customize the wamp.  MySQL has a mysql console.  Where does that come into play?
0
Dave BaldwinFixer of ProblemsCommented:
That is just an alternate way to launch the 'mysql' command line program.
0
assaultkittyAuthor Commented:
Thanks.
0
Dave BaldwinFixer of ProblemsCommented:
You're welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.