Create a MySQL user

In the terminal, type in the following command to login to MySQL:

mysql -u root -p

You will be prompted to enter your root password that you created during MySQL installation.

Once log in, enter the following command to create a new user:

CREATE USER [user name]@'localhost' IDENTIFIED BY [password];

Which can be for example:

CREATE USER 'ubuntu'@'localhost' IDENTIFIED BY 'ubuntu';

We can grant all privileges on a certain database for all hosts to this newly created user using the following command:

GRANT ALL PRIVILEGES
ON [database name].*
TO 'ubuntu'@'%'
IDENTIFIED BY 'ubuntu';

This will allow us to use this user with our Sqoop commands for that particular database.

results matching ""

    No results matching ""