MySQL
  Home arrow MySQL arrow Page 4 - Client Access Control with MySQL
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Client Access Control with MySQL
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2006-07-27

    Table of Contents:
  • Client Access Control with MySQL
  • 12.3.1 Connection Request Checking
  • 12.3.2 Statement Privilege Checking
  • 12.4 Exercises
  • Answers to Exercises

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Client Access Control with MySQL - 12.4 Exercises


    (Page 4 of 5 )

    Question 1:

    Which components of MySQL must you protect on the filesystem level?

    Question 2:

    Assume that you have three users who have login accounts on a host where a MySQL server is running. Users pablo and charlton need to communicate with the MySQL server, but user steve doesn't. How would you set the file permissions for the /usr/local/mysql/data directory so that pablo and charlton can access their databases located there but steve cannot?

    Question 3:

    As the root login user on a Linux host, how can you start the MySQL server so that it doesn't run as root, without having to log in as another user? How can you make sure that the server will always run as a user different from root?

    Question 4:

    What's the initial password of the MySQL root accounts in the grant tables that are set up during the installation procedure?

    Question 5:

    Having installed MySQL, you want to make sure that there's no MySQL account left that could connect to the server without specifying a password. How can you do this?

    Question 6:

    You want to set up a MySQL administrator account with all privileges. This administrator should be called superuser and the password should be s3creT. superuser should be able to connect only from the local host, and should be allowed to create new MySQL users. How would you create this account?

    Question 7:

    Which SQL functions could you use to store encrypted information? What functions could you use to retrieve the stored information unencrypted? Are there special prerequisites or requirements for using these functions?

    Question 8:

    What GRANT statement would you issue to set up an account for user steve, who should be able to manipulate data of tables only in the accounting database? steve should be able to connect to the server from anywhere. The account password should be some_password1.

    Question 9:

    What GRANT statement would you issue to set up an account for user pablo, who should be able to do all kinds of operations on the tables in the marketing database and should also be able to grant permissions to do those operations to other MySQL users? pablo should be able to connect to the server from the local network where IP numbers of all machines start with 192.168. The account password should be some_password2.

    Question 10:

    What GRANT statement would you issue to set up an account for user admin, who should be able to administer the database server, including performing all operations on all its databases and tables? admin should not, however, be able to grant privileges to other accounts. admin should be able to connect to the server only from the local host. The account password should be some_password3.

    Question 11:

    Consider the following privilege settings for the accounts associated with a given MySQL username, where the Select_priv column indicates the setting for the global SELECT privilege:

    mysql> SELECT
    -> Host, User, Select_priv
    -> FROM mysql.user
    -> WHERE User = 'icke'
    -> ; +--------------+------+-------------+ | Host | User | Select_priv | +--------------+------+-------------+ | 62.220.12.66 | icke | N | | 62.220.12.% | icke | Y | | 62.220.% | icke | N | +--------------+------+-------------+

    The Select_priv column indicates that the SELECT privilege for the second entry has been granted on a global scope (*.*). Will user icke be able to select data from any table on the MySQL server when connecting from the following hosts:

    • 62.220.12.66
    • 62.220.12.43
    • 62.220.42.43
    • localhost

    Assume that the icke accounts are not granted privileges in any of the other grant tables.

    Question 12:

    Assume that you set up an administrator for the MySQL server named superuser, and that this is the only account with the full set of privileges. In particular, this is the only account that can grant privileges to other accounts or shut down the server using mysqladmin shutdown. Unfortunately, you've forgotten the password for superuser. Assume that you can log on to the host where the MySQL server runs, and that you can do so as some administrative account (such as Administrator for Windows or root for Unix). What can you do to set up the MySQL superuser account with a new password, and what safety precautions would you take?

    More MySQL Articles
    More By Sams Publishing


       · This article is an excerpt from the book "MySQL 5.0 Certification Guide," published...
       · I Gideon deeplpy appreciate devshed for the effort made to get materials enabling...
       · Thank you for your interest! Well, we won't do your homework for you, but you can...
     

    Buy this book now. This article is excerpted from chapter 12 of the MySQL 5.0 Certification Guide, written by Paul Dubois et al. (Sams, 2005; ISBN: 0672328127). Check it out today at your favorite bookstore. Buy this book now.

       

    MYSQL ARTICLES

    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...
    - Building a Search Engine with MySQL and PHP 5
    - Using Boolean Operators for Full Text and Bo...
    - PHP, MySQL and the PEAR Database
    - Working with PHP and MySQL
    - Getting PHP to Talk to MySQL
    - Creating an RSS Reader: the Reader
    - MySQL Security Overview
    - Creating the Admin Script for a PHP/MySQL Bl...
    - Creating the Blog Script for a PHP/MySQL Blo...

    BlackBerry VTS




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway