How to grant all mysql 8.0 privileges to debezium in windows - mysql

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

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.

Related

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL serrver for mySQL [duplicate]

i have installed mysql 8.0.12 into one linux node and when i try to give below grant permission to get access from other nodes, i am getting 42000 error
command issued :
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%' IDENTIFIED BY 'password';
Return results:
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 'secure1t'' at line 1
Any help would be appreciated.
You don't use IDENTIFIED BY in GRANT queries, it's used in CREATE USER.
CREATE USER 'root'#'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%';
GRANT command reference
CREATE USER command reference
GRANT ALL PRIVILEGES ON your_desired_database_name.* TO 'root'#'localhost';
then
FLUSH PRIVILEGES;
**This worked for me and will work for you
**

Host 'XXX' is not allowed to connect to this MySQL server (V.8)

When trying to connect to MySQL running on a local network I'm getting the error message:
Host 'XXX' is not allowed to connect to this MySQL server.
Disclaimer (MySQL Ver 8)
The answers provided bellow do not solve te problem in MySQL v8
Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server
host 'localhost' is not allowed to connect to this MySQL server (#1130)
The solution provided in these old answers are returning the following error in MySQL Ver 8.0.13.
GRANT ALL PRIVILEGES ON mysql.* TO root#localhost IDENTIFIED BY 'pass123' WITH GRANT OPTION;
Or
Grant All Privileges ON *.* to 'root'#'%' Identified By 'pass123';
Output message:
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 'pass123' WITH GRANT OPTION' at line
1
See https://dev.mysql.com/doc/refman/8.0/en/grant.html
The GRANT syntax has changed in V8, you no longer need or are allowed the IDENTIFIED .. part.
CREATE USER 'fred'#'localhost' IDENTIFIED BY 'password';
GRANT All ON db.* to 'fred'#'%';
Or for anywhere on your local lan segment maybe something like this
GRANT All ON db.* to 'fred'#'10.0.0';

mysql ERROR 1064 (42000): You have an error in your SQL syntax;

i have installed mysql 8.0.12 into one linux node and when i try to give below grant permission to get access from other nodes, i am getting 42000 error
command issued :
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%' IDENTIFIED BY 'password';
Return results:
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 'secure1t'' at line 1
Any help would be appreciated.
You don't use IDENTIFIED BY in GRANT queries, it's used in CREATE USER.
CREATE USER 'root'#'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%';
GRANT command reference
CREATE USER command reference
GRANT ALL PRIVILEGES ON your_desired_database_name.* TO 'root'#'localhost';
then
FLUSH PRIVILEGES;
**This worked for me and will work for you
**

Mysql Master-Slave Replication Grant privileges to salve error

sql:
GRANT REPLICATION SLAVE ON *.* TO root#'172.17.0.5' IDENTIFIED BY PASSWORD 'root123';
Error Info:
[42000][1064] 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 PASSWORD 'root123'' at line 1
I thik it's helpful for you.
GRANT REPLICATION SLAVE ON *.* TO 'root'#'172.17.0.5' IDENTIFIED BY 'root123';

ERROR 1064 (42000) at line 1

I doing a Batch File and Got the error please help me.
The Error --
ERROR 1064 (42000) at line 1: 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 'GRANT OPTION' at line 1
MySQL Script
CREATE USER 'a4db'#'%' IDENTIFIED BY '0987654321';
GRANT ALL PRIVILEGES ON *.* TO 'a4db'#'%' IDENTIFIED BY '0987654321' WITH GRANT OPTION;
FLUSH PRIVILEGES;
I'm want to create the new user for remote the Sql Databases from client PC. If I copy the script to the workbench or to cmd it will run correctly and no error.
Please help me solve this error.
Add *.* between ON and TO ,the first * is your database name,and the second * is the table name. *.* means all database.all tables. For example, if you want this user just have the right to operate table 'test' in the database 'db',you may write like this db.test
GRANT ALL PRIVILEGES ON *.* TO 'a4db'#'%' IDENTIFIED BY '0987654321' WITH GRANT OPTION;