I have install MySql and now i am trying to get into the prompt of mysql with this command:
mysql -host localhost -p
but I am getting this error
ERROR 2005 (HY000): Unknown MySQL server host 'ost' (2)
I have install MySql and now i am trying to get into the prompt of mysql with this command:
mysql -host localhost -p
but I am getting this error
ERROR 2005 (HY000): Unknown MySQL server host 'ost' (2)
Your command line should be:
mysql --host=localhost -p
From the mysql
man page:
· --host=host_name, -h host_name
Connect to the MySQL server on the given host.
Seems like ost was not defined in /etc/hosts (assuming that's what your using for -host based on error)
Would be something like
ost 192.168.1.x
To be sure this is the problem, you can try to connect with ip address, rather than hostname and if that works, just edit
/etc/hosts
As directed, with proper address