Forums

connecting to mysql in the consol

i have spent 3 hours now trying to connect to mysql and keep getting error messages. the following is what my consol looks like

00:55 ~ $ mysql -umyname -hmyname.mysql.pythonanywhere.services.com -p
Enter password:
ERROR 2005 (HY000): Unknown MySQL server host 'myname.mysql.pythonanywhere.services.com' (0)

i have also tried : mysql -umyname$default -hmyname.mysql.pythonanywhere.services.com -p without any success. i am out out ideas. if anybody has an idea please help.

You have a little typo - it's pythonanywhere-services.com, with a dash, not pythonanywhere.services.com.

thank you. that solved my problem. i can't believe i spent 3 hours without noticing that.

i have spent 3 hours now trying to connect to mysql and keep getting error messages. the following is what my consol looks like

06:50 ~ $ mysql -uUdayKumar -hmysql-server -p Enter password: ERROR 2005 (HY000): Unknown MySQL server host 'mysql-server' (0)

That's the wrong host (has been deprecated for over a year and was officially taken out maybe half a year ago). Check your databases tab for what the correct hostname is.

Super helpful! Thanks for the responses folks.

Thanks for help