MySQL ERRO: Not connected while trying to connect via command line

MySQL

Whenever I try to type anything into the MySQL shell I get the following message: ERROR: Not connected. Could some body please tell me what to do? I am using a 64-bit Windows 7 version.

I tried to run C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --console and it says Shutdown complete every time I run it.

I tried to run C:\>....mysql I got the following message : ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I tried mysqld --install I got Install/Remove of the Service Denied!

Best Answer

I fixed the problem. I forgot that I needed to run

mysql --host=localhost --port=3310 --user=root -p

Thanks anyway for all those that tried to help me.