Wednesday, February 13, 2013

MySQL Installation and Database creation on Ubuntu 12.10

1. Install mysql on Ubuntu 12.10. (Use apt-get install mysql-server)
2. Log on to mysql as a root user
     $ mysql -u root
     $ mysql -u root -p
       Enter password: ENTER ROOT PASSWORD
3. Create a Database for Sterling Integrator
     mysql> create database SI52;
            Query OK, 1 row affected (0.00 sec)
4. Add User called sterling to SI52 Database
    mysql> grant usage on *.* to sterling@localhost identified by 'password';
    Query OK, 0 rows affected (0.00 sec)
    mysql>GRANT ALL PRIVILEGES ON SI52.* TO sterling@localhost IDENTIFIED BY password WITH GRANT OPTION;
    mysql>FLUSH PRIVILEGES;
5. Grant all priviliges to sterling user on SI52 database
   mysql> grant all privileges on amarokdb.* to amarokuser@localhost ;
   Query OK, 0 rows affected (0.00 sec)
6. Login as sterling user and check the database access to SI52
$ mysql -u sterling -p'password' SI52
    Your MySQL connection id is 12
    Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql>

      


No comments:

Post a Comment