I receive the following error:
ERROR 1396 (HY000) at line 11: Operation DROP USER failed for 'garen' @ 'localhost'
When I run this code:
-- DATABASE
-- Creamos la base de datos
DROP DATABASE IF EXISTS janitza511;
CREATE DATABASE janitza511;
USE janitza511;
-- USER
-- DROP USER IF EXISTS "garen"@"localhost";
-- Creamos el usuario para la base de datos
-- Se dropea del todo a causa de mysql no acepta "IF EXISTS"
DROP USER garen@localhost;
FLUSH PRIVILEGES;
CREATE USER garen@localhost IDENTIFIED BY 'CONTRASEÑA';
GRANT ALL PRIVILEGES ON *.* TO "garen"@"localhost" WITH GRANT OPTION;
FLUSH PRIVILEGES;
The command if I put it to hand, works perfectly; but if I do it from a sql, no.
I am working with MySQL and in a RaspberryPi 3.