show grant result
GRANT ALL PRIVILEGES ON A.* TO 'root'@'localhost'
GRANT ALL PRIVILEGES ON B.* TO 'root'@'localhost'
I use the stored procedure to select some rows from B.tableB and try to update A.tableA but I get UPDATE command denied to user 'root'@'localhost' for table 'tableA'
when I execute the procedure.
if I use A and update tableA in the terminal it will work.This is similar to
update command is denied for user he also doesn't know why this happens and I cannot change database in stored procedure.