HOME BLOG PORTFOLIO PHOTO CONTACT Admin Login
How to set Mysql password in wamp system

For this close your eyes for 2 seconds now open your eyes.
Go to C:wampappsphpmyadmin2.10.1 hereC: may change as per your pc/laptop hard disk path.
open index.php before open just take back-up of index.php

In index.php file go on top most of page and hit some enter key then paste below code.

<?php
if (!isset($_COOKIE["user"]))
{
?>
<hr />
<strong>Login for Php myadmin</strong>
<form name="formjay" method="post">
<input type="text" name="username" value="username" />
<input type="text" name="password" value="password" />
<input type="submit" value="send" name="send">
</form>
<strong>NOTE:When you close browser, its automatically logout</strong>
<hr />
<?php
if(($_POST["send"]=="send"))
{
if(($_POST["username"]=="root")&&($_POST["password"]=="root"))
{

$rem_addr= $_SERVER['REMOTE_ADDR'];
setcookie("user",$rem_addr);

header("Location:index.php");

}
else
{
echo "Fail";
exit;

}

 

}

 

}

 

?>

   Share on Facebook

Fatal error: Uncaught mysqli_sql_exception: MySQL server has gone away in /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php:67 Stack trace: #0 /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php(67): mysqli_query(Object(mysqli), 'INSERT INTO ips...') #1 /Applications/MAMP/htdocs/bharatbaba.com/analytics.jay.php(52): common::sql_query('INSERT INTO ips...') #2 /Applications/MAMP/htdocs/bharatbaba.com/footer.php(76): require_once('/Applications/M...') #3 /Applications/MAMP/htdocs/bharatbaba.com/blog.php(120): require_once('/Applications/M...') #4 {main} thrown in /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php on line 67