Page 1 of 1
to connect mysql
Posted: Mon Feb 05, 2007 1:43 am
by siyaco
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
Posted: Mon Feb 05, 2007 2:16 am
by Christopher
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".
Posted: Mon Feb 05, 2007 2:38 am
by siyaco
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?
Posted: Mon Feb 05, 2007 2:44 am
by Christopher
"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.
Posted: Mon Feb 05, 2007 10:39 am
by siyaco
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

Posted: Mon Feb 05, 2007 1:17 pm
by Ollie Saunders
Any WAMP distro worth its salt should put a shortcut to the MySQL client in the start menu somewhere.
Posted: Tue Feb 06, 2007 2:42 am
by siyaco
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?
Posted: Tue Feb 06, 2007 3:58 am
by Ollie Saunders
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.
Posted: Tue Feb 06, 2007 4:38 am
by siyaco
thanks for all, i will do what you say