Details: When connecting to MySQL database in GGCS, I get the following error message:
GGSCI> dblogin sourcedb ggdemo@localhost, userid root, password xxx 2016-08-06 07:53:25 WARNING OGG-00769 MySQL Login failed: . SQL error (2002). Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111). ERROR: Failed to connect to MySQL database engine for HOST localhost, DATABASE mysql, USER root, PORT 3306.
Answer: You can see that the MySQL configuration file path is different from the configured one /var/lib/mysql/mysql.sock. Set up the following environment variables before starting GGSCI.
export MYSQL_HOME=/var/lib/mysql export MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock
Then, the connection should be successful.
GGSCI (ip-172-30-3-204) 1> dblogin sourcedb ggdemo@localhost, userid root, password xxx Successfully logged into database.