Archive

February 2015

Browsing

MySQL shutdown unexpectedly or MySQL server not working properly

Error: MySQL shutdown unexpectedly.

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

 

MySQL shutdown unexpectedly or MySQL server not working properly
Solution:

exit Xampp server
go to your C:\xampp\mysql\data directory
delete the ibdata1 file
restart xampp server

How to Solve MySQL extension is deprecated?

How To Slove the Mysql extension is Deprecated ? and What is Deprecated Error?

After PHP5 version updated mysql_connect() is updated with Mysqi_Connect().

if you used old version of MYSQL_CONNECT() for database it shows Deprecated Error
For Example

CODE FOR CONNECT in old version

<?php
$link = mysql_connect('localhost', 'user', 'password');
mysql_select_db('databasename', $link);
?>

CODE FOR CONNECT in new version

<?php 
$link = mysqli_connect('localhost', 'user', 'password', 'databasename');
?>

Its look all database name also in same fields
Query:

<?php
In Old  mysql_query('CREATE TABLE `table`', $link); 
In New  mysqli_query($link, 'CREATE TABLE `table`');
?>


Fast and Easy Solution
Suppress all deprecated warnings including them from mysql_*:

<?php
error_reporting(E_ALL ^ E_DEPRECATED);
?>

Insert this code in the top of the php page.
If you have further questions: Just left them below in the comments
Enjoy Easy Coding