Installing PHPMyAdmin on Windows XP Pro 4





What do we have in this session 4?

  1. Creating a Controluser

  2. More Controluser Permission Assignments


Creating a Controluser


The following example assumes you want to use pma as the controluser and pmapass as the controlpass, but this is only an example: use something else in your file! Input these statements from the phpmyadmin SQL Query window or mysql command line client. Of course you have to replace localhost with the webserver's host if it's not the same as the MySQL server's one.


CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';


Creating MySQL user  from client console for phpmyadmin


Then verify the user creation by issuing the following command.


select host, user, password from mysql.user;



Verifying MySQL user creation


Next, grant permissions to user pma created previously.


GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';





Granting permission to MySQl user pma of MySQL database


Then, grant the query permissions.


    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
    Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
    Execute_priv, Repl_slave_priv, Repl_client_priv
    ) ON mysql.user TO 'pma'@'localhost';


The MySQL query permission assigned to MySQL user


More Controluser Permission Assignment


The following steps are more on the MySQL permission assignments.


GRANT SELECT ON mysql.db TO 'pma'@'localhost';


Granting the SELECT permission to MySQL user






GRANT SELECT ON TO 'pma'@'localhost';


Granting more permission to MySQl user


GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
    ON mysql.tables_priv TO 'pma'@'localhost';


Another MySQL select command permission assignment to MySQL user


If you want to use the many new relation and bookmark features issue the following MySQL command.


GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';


This of course requires that your phpmyadmin configuration storage be set up first.


Grant more related permissions to MySQL user for phpmyadmin database users


Then each of the true users should be granted a set of privileges on a set of particular databases. Normally you shouldn't give global privileges to an ordinary user, unless you understand the impact of those privileges (for example, you are creating a superuser).

For example, to grant the user real_user with all privileges on the database user_base you can issue the following command.


GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password';


What the user may now do is controlled entirely by the MySQL user management system. With http or cookie authentication mode, you don't need to fill the user/password fields inside the $cfg['Servers'] array.




< PHPMyAdmin 3 | Java and Opensource Friends | PHPMyAdmin 5 >





PHPMyAdmin 1 | PHPMyAdmin 2 | PHPMyAdmin 3 | PHPMyAdmin 4 | PHPMyAdmin 5 | PHPMyAdmin 6 | PHPMyAdmin 7 | Java and Opensource Friends