Page 235 - Open Soource Technologies 304.indd
P. 235

Open Source Technologies



                   Notes














                                 In the above window enter your user name, and then enter the password when prompted. The
                                 following window will be shown with Linux shell prompt (if the server is a Linux system) if
                                 both user name and password are correct. Please note that the prompt depends on the username,
                                 and will vary from user to user.

















                                 Now you are connected with the Linux server.
                                 14.2.2 Connecting to the MySQL Server

                                 Before you work with MySQL, ensure that you have a user name and password with appropriate
                                 permissions for connecting to and accessing the MySQL database.
                                 The GRANT and REVOKE commands allow system administrators to create users and grant
                                 and revoke rights to MySQL users at four privilege levels:

                                 Global level: The global privileges apply to all databases on a given server. These privileges
                                 are stored in the my sql.user table. REVOKE ALL ON *.* will revoke only global privileges.
                                 Database level: Database privileges apply to all tables in a given database. These privileges are
                                 stored in the mysql.db and mysql.host tables. REVOKE ALL ON db.* will revoke only database
                                 privileges.
                                 Table level: Table privileges apply to all columns in a given table. These privileges are stored
                                 in the my sql.tables_priv table. REVOKE ALL ON db.table will revoke only table privileges.

                                 Column level: Column privileges apply to single columns in a given table. These privileges
                                 are stored in the my sql.columns_priv table. When using REVOKE you must specify the same
                                 columns that were granted.

                                       Example:   mysql> GRANT ALL PRIVILEGES ON *.* TO name1@localhost  IDENTIFIED BY
                                               ‘pass’ WITH GRANT OPTION;






        230                               LOVELY PROFESSIONAL UNIVERSITY
   230   231   232   233   234   235   236   237   238   239   240