MySQL Forums
Forum List  »  Replication

Mysql 5.7 Replication
Posted by: Clive Gwyther
Date: February 24, 2022 08:43AM

Redhat 7.9
Mysql 5.7

I am having a problem with GTID Replication. The replication was working before installing httpd and php (as we are utilising bespoke gui front ends).

I stopped the slaves on both systems and created the "new" users required to access databases within Mysql. So, Completed the following:

stop slave; - on both systems
create user '<user'@'%<or hostname or IP>' identified by '<password>'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE,ALTER,EXECUTE ON <DB.*> TO <user mentioned above>;
flush privileges;

Precaution: quit and restart mysql - systemctl restart mysqld

start slave; - on both systems

Failure with :
Last_Errno: 1396
Last_Error: Error 'Operation CREATE USER failed for '<user>' on query. Default database: '<DB Name>'. Query: 'CREATE USER 'username' IDENTIFIED WITH 'mysql_native_password' AS '<password>'

I know there are lot's of pages with the "same" fix associated with this error. Here is the problem with that method:

delete from mysql.user where user='<username>' and host='%';
flush privileges;
drop user <username from above>; - This is because of a potential bug of username not showing but still being there.
flush privileges

Start slave on both systems.

I still get the error.

Any help would be much appreciated.

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql 5.7 Replication
178
February 24, 2022 08:43AM
92
February 24, 2022 10:10AM
94
February 24, 2022 10:27AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.