Velice jednoduchý MySQL shell. Shell nemá záměrně ošetřené vstupy.

<form method="post">
HOST: <input type="text" name="host" value="<?php if(!empty($_POST['host'])) echo $_POST['host'];else echo "";?>" /><br />
USER: <input type="text" name="user" value="<?php if(!empty($_POST['user'])) echo $_POST['user'];else echo "";?>" /><br />
PASS: <input type="text" name="passwd" value="<?php if(!empty($_POST['passwd'])) echo $_POST['passwd'];else echo "";?>" /><br />
DBNAME: <input type="text" name="dbname" value="<?php if(!empty($_POST['dbname'])) echo $_POST['dbname'];else echo "";?>" /><br />
<textarea name="quer" rows="5" cols="20"><?php if(!empty($_POST['quer'])) echo $_POST['quer'];else echo "";?></textarea><br />
<input type="submit" name="send" />
</form>
 
<?php
  error_reporting(0);
 
  if(!empty($_POST['send'])){
    mysql_connect($_POST['host'], $_POST['user'], $_POST['passwd']) or die(mysql_error());
    mysql_select_db($_POST['dbname']) or die(mysql_error());
 
    if($query = mysql_query($_POST['quer']))
      while($row = mysql_fetch_row($query)){
        foreach($row as $r)
          echo $r . " ";
        echo "<br />";
      }
    else
      echo "Error!! ".mysql_error();
  }
?>