Page 1 of 2

MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 09. August 2020 13:08
by Robin101
This is a copy of the last log for MySql. I would appreciate some advice/assistance as to what the actual problem is and how to correct it, or a link to where I could get the solution.
Thank you in advance. Robin

InnoDB: using atomic writes.
2020-08-09 12:36:18 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-08-09 12:36:18 0 [Note] InnoDB: Uses event mutexes
2020-08-09 12:36:18 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-09 12:36:18 0 [Note] InnoDB: Number of pools: 1
2020-08-09 12:36:18 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-08-09 12:36:18 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-08-09 12:36:18 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-09 12:36:19 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-08-09 12:36:19 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-09 12:36:19 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-09 12:36:19 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-08-09 12:36:19 0 [Note] InnoDB: Waiting for purge to start
2020-08-09 12:36:19 0 [Note] InnoDB: 10.4.13 started; log sequence number 112982270; transaction id 84495
2020-08-09 12:36:19 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-08-09 12:36:19 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-09 12:36:19 0 [Note] Server socket created on IP: '::'.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 10. August 2020 23:01
by stevewilson
Sorry to appear by replying that I have a solution, but maybe useful to make it known that it's not just you, I'm having the same problem, and it produces the identical log. In my case, I open Apache Control Panel, click "Start" for MySql, it flashes "Stop" for an instant, then back to "Start" with an error message and the log entry we both cite.

I'm running 7.3.7

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 16. August 2020 21:01
by stevewilson
There have been 200 views of this post by Robin with no one able to offer advice. In my case, this occurred straight out of the box. I ran Xampp which did its build and I then tried to activate MySql from the Xampp Control Panel, which is to say I did no tinkering, made zero adjustments, no meddling, threw no spanner into the works. So it's just Xampp.

Apparently the only solution is to back out the Xampp installation and try someone else's.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 16. August 2020 21:19
by Nobbie
I solved that forever by not using Windows. In Linux everyting runs fine.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 18. August 2020 15:11
by vuli
this is unvelibable. The same happend to me after restarting the PC. Now I will try again with 7.3.20

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 21. August 2020 22:16
by riponian
Yes me too exactly the same. Has been working absolutely fine for months but today I have this error after restarting pc and restarting XAMPP .

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 08. October 2020 19:08
by torvista
The logs mention
/data/ibtmp1
but it's not there...if I manually make that file, it gets deleted when attempting to start mysql.

This problem occurred a few months ago and I couldn't fix it so just got a later Xampp.

Now it's happened again on this recent Xampp but immediately after installing the last Windows optional update

https://support.microsoft.com/en-gb/hel ... -framework

Go figure..

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 10. October 2020 17:57
by Mayostor
Install mySQL as Service and never STOP/END it with the Xampp control panel.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 10. October 2020 18:35
by torvista
The service installs, but cannot start: error 1067.

These events are in the Event Viewer
mysqld.exe: Index for table '.\mysql\roles_mapping' is corrupt; try to repair it
Couldn't repair table: mysql.roles_mapping
Fatal error: Can't open and lock privilege tables: Index for table 'roles_mapping' is corrupt; try to repair it
Aborting

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 12. October 2020 13:21
by Mayostor
Your mysql.db and useraccounts are broken. You must do a clean install of xampp, if all your needed componets are installed run the Xampp-Control-Panel and install ONLY mySQL as service..click on the [X]. Restart your computer..

From now, you can use the Xampp-Control-Panel to start Apache, MySQlAdmin etc and stop it but NEVER stop mySQL with the Control-Panel...if you need to stop mySQL, uninstall the mySQL-service and restart your Computer...to start again mySQL, install the service and restart the computer.

This ist the only working solution that i know..

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 12. October 2020 13:33
by Altrea
Mayostor wrote:but NEVER stop mySQL with the Control-Panel...if you need to stop mySQL, uninstall the mySQL-service and restart your Computer...to start again mySQL, install the service and restart the computer.

If MySQL/MariaDB is registered as service it can securely get started and stopped from the XAMPP control panel because the control panel triggers the service to stop MySQL/MariaDB.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 12. October 2020 14:54
by Mayostor
Altrea wrote:If MySQL/MariaDB is registered as service it can securely get started and stopped from the XAMPP control panel because the control panel triggers the service to stop MySQL/MariaDB.


I testet this but the db crashed after a period nevertheless...now 5 weeks working fine without shuting down mysql.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 12. October 2020 15:49
by Altrea
Mayostor wrote:I testet this but the db crashed after a period nevertheless...now 5 weeks working fine without shuting down mysql.

Then this is a major issue in MariaDB for Windows and not an XAMPP issue any more. Unregistering the service will not solve this issue. Maybe you were just lucky the last 5 weeks.

Theory since now was that the way XAMPP control panel stops MariaDB if not registered as service will corrupt MariaDB tables and functionalities.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 24. October 2020 05:59
by Eradan
After doing some looking around, I found this link over at StackOverflow, with a similar issue, only in Linux: https://stackoverflow.com/questions/28521530/mysql-fatal-error-cant-open-and-lock-privilege-tables-incorrect-file-format

It took me a little bit to translate the resolution over, but here's how I fixed the issue I was having:
    I checked the Event Viewer, under "Applications" for errors from MariaDB. The error right before the simple "Aborting" error said "Fatal error: Can't open and lock privilege tables: incorrect file format 'db' ".
  1. Open a Command Prompt (Windows+R cmd.exe will work, or, on Windows 10 click the Windows menu, scroll down to the Windows System menu, and click on Command Prompt)
  2. Change to the xampp\mysql\bin directory
    Code: Select all
    cd C:\xampp\mysql\bin
  3. Manually start the mysql server, but bypass the privilege system
    Code: Select all
    mysqld --user=root --skip-grant-tables
  4. Open another Command Prompt (since the new instance of mysqld is running in this one.
  5. Change to the xampp\mysql\bin directory
  6. Start the mysql console command
    Code: Select all
    mysql
  7. Enter the following:
    Code: Select all
    use mysql
    repair table db use_frm;

    If this worked, you should get an ascii-art table, with one or two lines, the first one showing a warning, in my case stating that the number of rows changed from 0 to 5, and the second line showing a status of "Ok"
  8. Now exit the mysql console command
    Code: Select all
    exit
  9. Go ahead and launch the xampp control panel, if it isn't already, and use it to stop the mysql process, it should see it running.
    If this worked, you should be able to switch to that first Command Prompt window, where mysqld was running, and you should be back to a "C:\xampp\mysql\bin>"-style prompt.
  10. If this has all worked, close both Command Prompt windows, either by clicking the close button, or typing "exit", without the quotes)
  11. Switch back to the xampp control panel, and click the start button for mysqld. This time it should keep running.

This got me up and running again, even after 3-4 reboots.

Re: MySQL Stops after starting it. XAmpp 7.4.7

PostPosted: 08. March 2021 23:43
by patchwork
Hi, I just registered to say the solution pointed out by Eradan solved my problem.
This has been a recurring problem for me and the reason I'm in and out of Xampp.
Maybe this will keep me around for longer.
By the way, I've turned to Xampp again because Acquia (Drupal) is killing its local development environment.