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.
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.