配置OGG到MYSQL複製時登陸MYSQL報錯解決
阿新 • • 發佈:2018-12-23
1.MYSQL登陸報錯
[[email protected] mysqlogg]$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
此時使用 mysql -u root 即不使用密碼可以登陸。
重改密碼:使用root使用者操作
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES; ---重新整理資料庫中資料。
mysql> quit
# /etc/init.d/mysqld restart
此時就可以使用密碼登陸了。
# mysql -u root -p
Enter password:
mysql>
2.OGG中登陸MYSQL報錯解決
GGSCI (bys2.oel.com) 2> dblogin sourcedb oggtest,userid root
Password:
2013-08-30 12:03:14 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.
GGSCI (bys2.oel.com) 3> exit
[[email protected] mysqlogg]$ su -
Password:
[[email protected] ~]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
[[email protected] ~]# exit
logout
[[email protected] mysqlogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for MySQL
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x86, 32bit (optimized), MySQL Enterprise on Apr 23 2012 04:29:30
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (bys2.oel.com) 1> dblogin sourcedb oggtest,userid root
Password:
Successfully logged into database.
[[email protected] mysqlogg]$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
此時使用 mysql -u root 即不使用密碼可以登陸。
重改密碼:使用root使用者操作
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES; ---重新整理資料庫中資料。
mysql> quit
# /etc/init.d/mysqld restart
此時就可以使用密碼登陸了。
# mysql -u root -p
Enter password:
mysql>
2.OGG中登陸MYSQL報錯解決
GGSCI (bys2.oel.com) 2> dblogin sourcedb oggtest,userid root
Password:
2013-08-30 12:03:14 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.
GGSCI (bys2.oel.com) 3> exit
[[email protected] mysqlogg]$ su -
Password:
[[email protected] ~]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
[[email protected] ~]# exit
logout
[[email protected] mysqlogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for MySQL
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x86, 32bit (optimized), MySQL Enterprise on Apr 23 2012 04:29:30
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (bys2.oel.com) 1> dblogin sourcedb oggtest,userid root
Password:
Successfully logged into database.