Create a new user and grant permission to a database

CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON dbTest.* To ‘user’@’localhost’ IDENTIFIED BY ‘password’;

Advertisements

Import txt to mysql

mysql> LOAD DATA LOCAL INFILE ‘/home/absolute/dat_catenoti.txt’ INTO TABLE dat_catenoti FIELDS TERMINATED BY ‘|’ LINES TERMINATED BY ‘\r\n’;