Friday, July 15, 2011

Create a database with a user

Just a simple reminder ...

mysql>mysql -u root
mysql>create database db;
mysql>GRANT ALL ON db.* TO 'integration'@'localhost' IDENTIFIED BY 'integration';
mysql>GRANT ALL ON db.* TO 'integration'@'%' IDENTIFIED BY 'integration';
mysql>flush privileges;
mysql>quit

Then you can do on localhost or  on your IP:

mysql -u integration -p 
mysql -u integration -h 127.0.0.1 -p

No comments:

Post a Comment