Search code examples
mysqlwindowsdebezium

How to grant all mysql 8.0 privileges to debezium in windows


I tried the below command

mysql> GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, 
REPLICATION CLIENT ON *.* TO 'debezium' IDENTIFIED BY 'dbz';

It gave the following error

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'dbz'' at line 1


Solution

  • To grant all privileges use GRANT ALL

    GRANT ALL  ON *.* TO 'debezium'@'%' IDENTIFIED BY 'dbz';
    

    You are missing the host in your query I added % you can log in from anywhere, change it based on your needs.