Far
Far

Reputation: 439

Sudddenly 'MySQL shutdown unexpectedly' appearing in Xampp after working fine previously

Previously I was facing a problem where unless I didn't include skip-grant-tables in my.ini, I couldnt access phpmyadmin. After this I use to repair the user table as it always showed some problem. But to fix this I deleted the User.FRM, User.MYD, User.MYI files from ..\xampp\mysql\data\mysql folder and copied the same files from the backup directory ..\xampp\mysql\backup\mysql to the ..\xampp\mysql\data\mysql. After that, I was able to access phpmyadmin without errors (with skip-grant-tables) and inserted a user in the user table. Removing the skip-grant-tables from my.ini and restarting the server lead to this problem where Mysql runs for a second then it stops with the following error:

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

Now whether I include skip-grant-tables or not, Mysql shuts down unexpectedly

Things I tried:

  1. Deleted the ibdata1, ib_logfile1, ib_logfile0 files and restarted the server
  2. Changed the ports for Mysql and even Apache.

  3. Added the following line below the [mysqld] section in the mysql config file (my.ini) and restarted the apache web server and the mysql service.

    [mysqld]
    innodb_force_recovery = 1
    
  4. Launched Xampp as administrator and tried to start MySql

None of them solved the problem and Mysql still shuts down unexpectedly

MySQL_error.log consists of

        [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
        [Note] InnoDB: Uses event mutexes
        [Note] InnoDB: Compressed tables use zlib 1.2.11
        [Note] InnoDB: Number of pools: 1
        [Note] InnoDB: Using SSE2 crc32 instructions
        [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
        [Note] InnoDB: Completed initialization of buffer pool
        [Note] InnoDB: 128 out of 128 rollback segments are active.
        [Note] InnoDB: Creating shared tablespace for temporary tables
        [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
        [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
        [Note] InnoDB: 10.3.16 started; log sequence number 1604074; transaction id 9
        [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
        [Note] InnoDB: Buffer pool(s) load completed at 191030  9:59:17
        [Note] Plugin 'FEEDBACK' is disabled.
        [Note] Server socket created on IP: '::'.

Can someone help what might be the reasons? Can it be due the fact that I deleted the User.FRM, User.MYD, User.MYI files from the mysql and copied them from the backup folder? What is the solution to this problem?

Update Deleted all the files in ..\xampp\mysql\data except the folders and relaunched xampp with administrator rights and started MySql. Now it doesnt shut down But the phpmyadmin displays the following error

      MySQL said: Documentation

       Cannot connect: invalid settings.
       mysqli_real_connect(): (HY000/2002): No connection could be made 
       because the target machine actively refused it.

       Connection for controluser as defined in your configuration failed.
       mysqli_real_connect(): (HY000/2002): No connection could be made    
       because the target machine actively refused it.

       phpMyAdmin tried to connect to the MySQL server, and the server           
       rejected the connection. You should check the host, username and 
       password in your configuration and make sure that they correspond to 
       the information given by the administrator of the MySQL server.

Any help would be appreciated

Upvotes: 0

Views: 231

Answers (1)

Far
Far

Reputation: 439

I have uninstalled and reinstalled the Xampp and that seems to be solving the problem Thank you so much for the great help to all.

Upvotes: 0

Related Questions