Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
siyaco
Forum Commoner
Posts: 26 Joined: Mon Feb 05, 2007 1:36 am
Location: Kurdistan Mountains
Post
by siyaco » Mon Feb 05, 2007 1:43 am
hi guys, i am new in this site. sorry about my poor English, because I am Kurdish boy
i have just started to mysql and had a problem. i want to study on cmd at first ( i use windows). i set up the wamp server, so it has mysql. but in cmd i couldn't connect the mysql (i learnt it from Laura thomson and luke welling)
i wrote;
mysql -h hostname -u username -p
but it says; mysql is not recognised, is it caused from wamp, or what?
thanks all advance
Christopher
Site Administrator
Posts: 13596 Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US
Post
by Christopher » Mon Feb 05, 2007 2:16 am
Is "mysql" in your path? You may need to add it to your path or type "c:\path\to\mysql -h hostname -u username -p".
(#10850)
siyaco
Forum Commoner
Posts: 26 Joined: Mon Feb 05, 2007 1:36 am
Location: Kurdistan Mountains
Post
by siyaco » Mon Feb 05, 2007 2:38 am
there is mysql folder :
C:\wamp\mysql
so in cmd i went to there and write, that is the result;
C:\wamp\mysql>mysql mysql -h hostname -u username -p
'mysql' is not recognized as an internal or external command,
operable program or batch file.
what must i do?
Christopher
Site Administrator
Posts: 13596 Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US
Post
by Christopher » Mon Feb 05, 2007 2:44 am
"C:\wamp\mysql" is probably the main directory name. Try "C:\wamp\mysql\bin\mysql mysql -h hostname -u username -p "
Use "dir" to see the files in the directory and search for the "mysql.exe" program.
(#10850)
siyaco
Forum Commoner
Posts: 26 Joined: Mon Feb 05, 2007 1:36 am
Location: Kurdistan Mountains
Post
by siyaco » Mon Feb 05, 2007 10:39 am
arborint wrote: "C:\wamp\mysql" is probably the main directory name. Try "C:\wamp\mysql\bin\mysql mysql -h hostname -u username -p "
Use "dir" to see the files in the directory and search for the "mysql.exe" program.
that was right, thank. i did it
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Mon Feb 05, 2007 1:17 pm
Any WAMP distro worth its salt should put a shortcut to the MySQL client in the start menu somewhere.
siyaco
Forum Commoner
Posts: 26 Joined: Mon Feb 05, 2007 1:36 am
Location: Kurdistan Mountains
Post
by siyaco » Tue Feb 06, 2007 2:42 am
ole wrote: Any WAMP distro worth its salt should put a shortcut to the MySQL client in the start menu somewhere.
as i understood, yes it has. when i started the wamp, in wamp tray i can start the mysql or stop, of course in localhost i can modify the mysql from phpmyadmin. but at first i want to learn mysql from cmd, console.
isn't it a good begining?
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Tue Feb 06, 2007 3:58 am
Yes it is. I did the same. The...
I wrote: MySQL client
...is a command line utility that comes with MySQL. Have a recursive poke around the MySQL folder for executables.
siyaco
Forum Commoner
Posts: 26 Joined: Mon Feb 05, 2007 1:36 am
Location: Kurdistan Mountains
Post
by siyaco » Tue Feb 06, 2007 4:38 am
thanks for all, i will do what you say