lunes, 4 de julio de 2016

creating user on mysql

CREATE USER 'freepbxuser'@'localhost' IDENTIFIED BY '2366';




SET PASSWORD FOR 'freepbxuser'@'localhost' = PASSWORD('Linux456');




GRANT ALL PRIVILEGES ON asterisk.* TO freepbxuser@localhost IDENTIFIED BY 'Linux456';


dandole permiso a todas las tables

CREATE USER 'admin'@'localhost' IDENTIFIED BY '2366';

mysql> GRANT ALL PRIVILEGES ON *.*  TO admin@localhost IDENTIFIED BY '012130';


grant   to login from any IP

GRANT ALL PRIVILEGES ON *.*  TO admin@'%' IDENTIFIED BY '7812333';

-------------------------------------------------------------

mysql 8
mysql> CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY '9YB11111';
GRANT ALL ON *.* TO 'phpmyadmin'@'%';
FLUSH PRIVILEGES;


USE mysql;
CREATE USER 'user'@'localhost' IDENTIFIED BY 'P@ssW0rd';
GRANT ALL ON *.* TO 'user'@'localhost';
FLUSH PRIVILEGES;