您的当前位置:首页正文

配置OGG到MySQL复制时登陆MySQL报错解决

2020-11-09 来源:星星旅游

1.MYSQL登陆报错[Oracle@bys2 mysqlogg]$ mysql -u root -pEnter password: ERROR 1045 (28000): Access denied for user

1.MYSQL登陆报错
[Oracle@bys2 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
[oracle@bys2 mysqlogg]$ su -
Password:
[root@bys2 ~]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
[root@bys2 ~]# exit
logout
[oracle@bys2 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.

推荐阅读:

两台Oracle之间配置OGG-未配置同步DDL

OGG配置DML单向复制一例及错误分析

OGG-00446 ERROR: Could not find archived log

Oracle Linux 5.7 部署OGG v11 oracle to oracle

GoldenGate源端意外宕机,导致OGG-01031报错

linux