Menu

Can i block mysql ROOT user login thr adminer

Help
Anonymous
2011-05-28
2013-06-06
  • Anonymous

    Anonymous - 2011-05-28

    For security reason, can i block mysql ROOT user from login thru adminer?  I'm using ssh terminal login as root account for mysql so is great if i can block mysql ROOT account from access thru adminer. How to manually add a username block list?

     
  • Jakub Vrána

    Jakub Vrána - 2011-05-30

    It's quite simple. Create a login method returning false for $login == "root". http://www.adminer.org/en/extension/

     
  • Nobody/Anonymous

    i getting suck, this will what i do, i only download Adminer 3.2.2 for MySQL (adminer-3.2.2-mysql.php and rename it to adminer.php) and i create a new index.php and this what i input in the index.php

    <?php
    function adminer_object() {
    class AdminerSoftware extends Adminer {
    function name() {return 'Software';}
    function login() {$login = "root"; return false;}
    }
    return new AdminerSoftware;
    }
    include "./adminer.php";
    

    If i remove function login() {$login = "root"; return false;}, the work thing work and name is change to Software. when i add that line of code back. i can't login with any of the working users. Any help?

     
  • Jakub Vrána

    Jakub Vrána - 2011-05-31

    Use this:

    <?php
    function adminer_object() {
        
        class AdminerNoRoot extends Adminer {
            
            function login($login, $password) {
                return ($login != 'root');
            }
            
        }
        
        return new AdminerNoRoot;
    }
    include "./adminer.php";
    
     
  • Anonymous

    Anonymous - 2011-05-31

    Sweet!!! it work. Thank

     

Log in to post a comment.