ogg里连接不上mysql的错误解决

1.mysql安装后,通过./etc/rc.d/init.d/mysql start来启动mysql

 

在ogg里出如下的错误:


GGSCI (rhel133) 6> dblogin sourcedb mydb,userid root
Password:
2013-08-28 17:10:21  WARNING OGG-00769  MySQL Login failed: . SQL error (2002). Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
ERROR: Failed to connect to MySQL database engine for HOST localhost, DATABASE , USER root, PORT 3306.

 

这时需要配置一下环境变量:

 

-bash-3.00$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi


export MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock
export PATH=$PATH:/u01/app/mysql/ogg11

重新登入mysql用户后,

GGSCI (rhel133) 1>  dblogin sourcedb mydb,userid root
Password:
Successfully logged into database.

2.如果出现这种错误:

2013-08-29 10:09:54  WARNING OGG-00769  Oracle GoldenGate Delivery for MySQL, rep1.prm:  MySQL Login failed: . SQL error (2002). Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
2013-08-29 10:09:54  ERROR   OGG-00770  Oracle GoldenGate Delivery for MySQL, rep1.prm:  Failed to connect to MySQL database engine for HOST localhost, DATABASE , USER root, PORT 3306.

解决方法:

[root@ ] ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

 


 

你可能感兴趣的:(MYSQL,GoldenGate)