Forums

ERROR 2002 (HY000): Can't connect to local MySQL

Hello, i got this error when i was trying to make a backup for my database. using this command : cd mysqldump -u yourusername -h yourusername.mysql.pythonanywhere-services.com --set-gtid-purged=OFF --no-tablespaces 'yourusername$dbname' > db-backup.sql

i noticed that i am not able to connect mysql even if i type only mysql in my bash console. it worked well before, now i dont know what is going on

Can you show the exact command you're using? The one you showed looks suspicious (especially the cd at the beginning). If you don't want to show details here, please drop us a line at support@pythonanywhere.com.