->vi /etc/mysql/my.cnf
->change bind-address = 127.0.0.1 to bind-address = *
->save it.
->/etc/init.d/mysql restart
->mysql u- root -p
-> put your password
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
See user list:
->select host, user from mysql.user;
Delete user MYSQL:
DROP USER ‘demo’@‘localhost’;
No comments:
Post a Comment