Error: MySQL shutdown unexpectedly Xampp server

Error: MySQL shutdown unexpectedly.This may be due to a blocked port, missing dependencies,
12:23:06 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:23:06 PM [mysql] Press the Logs button to view error logs and check
12:23:06 PM [mysql] the Windows Event Viewer for more clues
12:23:06 PM [mysql] If you need more help, copy and post this
12:23:06 PM [mysql] entire log window on the forums

  1. You can change the port number of Mysql from xampp from 3306 to 3307 or 3308 as you wish, if it still didn’t work out then use the below steps.
  2. Go to Task Manager , Process and then End process the current mysql process and then now you can start the mysql again from xampp it will workout



Hide DB from Mysql PHPmyadmin

To hide the database from the phpmyadmin follow the below steps,

  1. Go to xampp folder  , open phpmyadmin folder
  2. open the file named “”
  3. paste the below code  ”   $cfg[‘Servers’][$i][‘hide_db’] = ‘^DatabaseName$’; “
  4. Specify the database name which you want to hide after ^ symbol
  5. That’s it.


Encrypt password on client side and Decrypt on server side using jquery and php


function encrypt()
var key = CryptoJS.enc.Hex.parse(“0123456789abcdef0123456789abcdef”);
var iv = CryptoJS.enc.Hex.parse(“abcdef9876543210abcdef9876543210″);

var pass=document.getElementById(‘new_pwd’).value;
var hide=document.getElementById(‘hide’).value;
document.getElementById(‘err’).innerHTML=’Error:Password is missing’;
return false;
document.getElementById(“hide”).value = document.getElementById(“new_pwd”).value;
//var hash = CryptoJS.MD5(pass);

var hash = CryptoJS.AES.encrypt(pass, key, {iv:iv});

return true;


$key = pack(“H*”, “0123456789abcdef0123456789abcdef”);
$iv = pack(“H*”, “abcdef9876543210abcdef9876543210”);
$encrypted = base64_decode($this->input->post(‘new_pwd’));
$shown = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $encrypted, MCRYPT_MODE_CBC, $iv);
echo $shown;