Mysql is installed on bitnami machine hosted at EC2. I can access it remotely, but when I connect machine via SSH and try to login to mysql, I get errors.
This is what I'm doing
mysql -u root -p
and get this error after supplying correct password
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/bitnami/mysql/tmp/mysql.sock' (2)
Initially, I remember, I could login via root user but then I changed "my.cnf" file and there was a procedure written down in bitnami documentation about how to restart mysql on bitnami, so i did that. From that day I'm getting this error. But I've changed back my.cnf to its original condition and restarted but couldn't login now.
Here is my.cnf file
> user = root
> basedir = /opt/bitnami/mysql
> datadir = /opt/bitnami/mysql/data
> port = 3306
> socket = /opt/bitnami/mysql/tmp/mysql.sock
> tmpdir = /opt/bitnami/mysql/tmp
> bind-address = 127.0.0.1
> character-set-server = UTF8
> collation-server = utf8_general_ci
> mysqld = mysqld.bin
> [client] port = 3306
I actually commented out the bind-address line.