Help for this page

Select Code to Download


  1. or download this
    
        my $user = 'somename';     
    ...
        $sql = 'GRANT ALL ON $db.* TO ?@? IDENTIFIED BY ?';
        $dbh->do(q{GRANT ALL ON ?.* TO ?@? IDENTIFIED BY ?}, {}, $db, $use
    +r, $host, $password);
        print "done!\n";
    
  2. or download this
    Connecting to terminology database test as root... done!
    Creating user somename
    done!
    Granting user somename some rights
    DBD::mysql::db do failed: You have an error in your SQL syntax; check 
    +the manual that corresponds to your MySQL server version for the righ
    +t syntax to use near ''test'.* TO 'somename'@'localhost' IDENTIFIED B
    +Y '0123'' at line 1