mysql : GRANT ALL PRIVILEGES ON *.* to user12@192.168.1.99 IDENTIFIED BY 'password'
mysql : GRANT ALL PRIVILEGES ON *.* to syslog@localhost IDENTIFIED BY 'syslog';
GRANT FILE ON *.* TO repl@"%" IDENTIFIED BY 'passwort';


-- creates a user named joey without any privileges --
CREATE USER 'joey'@'%' IDENTIFIED BY 'joey123';

-- gives all privileges to user 'joey' only on the database named 'joeys_db'
GRANT ALL ON joeys_db.* to joey;

-- gives the FILE privilege to joey (must use the global parameter --> *.*)
GRANT FILE ON *.* to joey;

-- show privileges granted to user 'joey'
SHOW GRANTS FOR joey;

-- drop/delete user 'joey'
DROP USER joey;

-- displays all users in the system
USE mysql;
SELECT * FROM USER

mysql dump:
mysqldum p -u web1 --password=xxx usr_web1_1 >MYSQLFILENAME

mysqlrestore
mysql --user=web5 --password=xxx usr_web5_1 <MYSQLFILENAME


mysqlimport -d -u root -p xyz--local actual.csv --fields-terminated-by=';' --lines-terminated-by='\n' --ignore-lines=1

computer2know :: thank you for your visit :: have a nice day :: © 2024