MySQL Stops after starting it. XAmpp 7.4.7

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL Stops after starting it. XAmpp 7.4.7

Postby torvista » 15. March 2021 17:32

Since I have various Xampps in use, they are in their own directory ie c:\xampp-8.0.1\...

So, following the instructions above, when trying to start via the command line I get a warning

[Warning] Can't create test file c:\xampp\mysql\data\E590.lower-test

If I create the directory/file, it does start....
but then the "use mysql" returns "Unknown database 'mysql'"
since I assume since it is using this empty /xampp directory...

So...I assumed there was some default setting somewhere that did not got changed on the setup_xampp script.
In mysql/data there is another my.ini file which does point to the /xampp directory.
I changed that to match the real my.ini and the [Warning] Can't create test file c:\xampp\mysql\data\E590.lower-test, did not appear, but still it failed to start.

However there were new messages in the mysql_error.log:
[ERROR] InnoDB: Operating system error number 3 in a file operation.
[ERROR] InnoDB: The error means the system cannot find the path specified.
[ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
[ERROR] InnoDB: Cannot open datafile for read-only: '.\mysql\gtid_slave_pos.ibd' OS error: 203

I tried creating that file in that directory, and subdirectories, but got no further.

[EDIT by Altrea: Splitted from original topic - one topic per unique user and issue rule]
torvista
 
Posts: 18
Joined: 27. July 2009 04:15

Re: MySQL Stops after starting it. XAmpp 7.4.7

Postby Eradan » 15. March 2021 19:00

Before I begin, please keep in mind that I am NOT, by ANY MEANS, an expert with either mysql, nor XAmpp. I simply "ported" or "transcribed" a Linux OS-based remedy over to its Windows equivalent. The issue at hand was still with mysqld and XAmpp, not the underlying operating system.

That said,
torvista wrote:Since I have various Xampps in use, they are in their own directory ie c:\xampp-8.0.1\...


The workaround I posted was for a different major version of XAmpp. I do not know if it will work with yours (7.4 vs 8.x).

torvista wrote:So, following the instructions above, when trying to start via the command line I get a warning

[Warning] Can't create test file c:\xampp\mysql\data\E590.lower-test


According to https://dev.mysql.com/doc/refman/8.0/en/cannot-create.html:
https://dev.mysql.com/doc/refman/8.0/en/cannot-create.html wrote:If you get an error of the following type during startup, it indicates that the file system or directory used for storing data files is write protected. Provided that the write error is to a test file, the error is not serious and can be safely ignored.
Code: Select all
Can't create test file /usr/local/mysql/data/master.lower-test


You might want to check the permissions of the directory, and also make sure (especially where you have multiple versions installed) that there isn't another program/instance trying to access files/directories under that directory at the same time.

torvista wrote:If I create the directory/file, it does start....
but then the "use mysql" returns "Unknown database 'mysql'"
since I assume since it is using this empty /xampp directory...


You're probably right, there, especially if you had to create it. You might also want to double-check with your antivirus/antimalware solution, to make sure it hasn't seen something there as viral/a false positive/etc. If it has, you may need to rescan the directory, (and, if it's clean, whitelist it) and reboot your machine - even if you whitelist the directory, as long as Windows has been told that there's a problem in that area, it will pitch all kinds of tantrums if you keep trying to access those files/directories.

torvista wrote:So...I assumed there was some default setting somewhere that did not got changed on the setup_xampp script.
In mysql/data there is another my.ini file which does point to the /xampp directory.
I changed that to match the real my.ini and the [Warning] Can't create test file c:\xampp\mysql\data\E590.lower-test, did not appear, but still it failed to start.

However there were new messages in the mysql_error.log:
[ERROR] InnoDB: Operating system error number 3 in a file operation.
[ERROR] InnoDB: The error means the system cannot find the path specified.
[ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
[ERROR] InnoDB: Cannot open datafile for read-only: '.\mysql\gtid_slave_pos.ibd' OS error: 203

I tried creating that file in that directory, and subdirectories, but got no further.


If I'm not mistaken (I easily could be), there should have been a few more lines below that "OS error: 203" part, which includes a link to a table with a list of what those codes mean. A Google search pulled up https://mariadb.com/kb/en/operating-system-error-codes/

According to the table there, for Windows, error 3 DOES mean the system cannot find the path specified, so you need to double-check how paths are entered in your configuration & .ini files.

In order to figure out what the OS error 203 is, and keep in mind this is from 7.4.7 and not 8.0.1, but from the mysql shell (open XAMPP Control Panel, click the "Shell" button on the right), I had to use the "perror" utility:
Code: Select all
perror 203


In my case, it says
Code: Select all
Win32 error code 203: The system could not find the environment option that was entered.


I'm guessing these new errors are due to changes made to their respective configuration files & .ini files in your XAmpp installations, so I'd recommend undoing those changes. If you did not make backups, or sufficient notes to undo those changes, you may have to uninstall & reinstall XAmpp.

All of this said, since your particular situation seems very different from the rest of us that have posted in this thread, you might want to open a new thread with your setup listed, including all the XAMPP installations you have (and where), their environment, and probably try to focus on troubleshooting one installation at a time (but, if the REAL experts are okay with troubleshooting more than one at a time, that's up to them, of course). Since I'm not so much an XAMPP expert, nor a mysql expert, anything I have to say here is simply semi-educated guesses (but at least Google was able to help me find what information I could happily provide).
Eradan
 
Posts: 4
Joined: 24. October 2020 05:11
XAMPP version: 7.4.5
Operating System: Windows 10 Pro x64

Re: MySQL Stops after starting it. XAmpp 7.4.7

Postby torvista » 15. March 2021 23:09

Many thanks for your time and interest.
I see two issues:
a) why does it break in the first place?
b) for the fixing procedure/to repair the mysql table, why are these supposed file access problems occurring and are they related to a)?

Antivirus is off, no other files accessing the folder and all files are read-write.

I was thinking perhaps this is a laptop issue, corrupting a table on suspend. But I find that today the last two working Xampps installs I had (7.4.13 and 8.0.1), have both stopped working in the same way (as per the original post of this thread). So, since they were not in use at the same time, and I using them last night, I think it is not a Xampp issue, but "something else".

For the record I use Bitdefender and MMB free.
torvista
 
Posts: 18
Joined: 27. July 2009 04:15

Re: MySQL Stops after starting it. XAmpp 7.4.7

Postby Eradan » 17. March 2021 09:51

torvista wrote:Many thanks for your time and interest.
I see two issues:
a) why does it break in the first place?
b) for the fixing procedure/to repair the mysql table, why are these supposed file access problems occurring and are they related to a)?

Antivirus is off, no other files accessing the folder and all files are read-write.

I was thinking perhaps this is a laptop issue, corrupting a table on suspend. But I find that today the last two working Xampps installs I had (7.4.13 and 8.0.1), have both stopped working in the same way (as per the original post of this thread). So, since they were not in use at the same time, and I using them last night, I think it is not a Xampp issue, but "something else".

For the record I use Bitdefender and MMB free.

I use BitDefender Free, myself, as well as SpyBot S&D & MalwareBytes AntiMalware Free, myself ;)

As for your questions, I'm afraid you'll want to wait for someone with more experience than me. I notice Altrea split off your issue into a separate topic, like I recommended you do. If you suspect it is no longer an XAMPP issue, check it out, eliminate it as a possibility. Then, I'd recommend backing up your files, and starting each XAMPP installation fresh, then one by one restoring or recreating your databases into this pristine structure, and seeing if something breaks. If it doesn't, you've probably solved the problem. If not, come back here and open a new thread for those issues as they come up. Once you've got one installation running properly, then move on to the other, in the same way.
Eradan
 
Posts: 4
Joined: 24. October 2020 05:11
XAMPP version: 7.4.5
Operating System: Windows 10 Pro x64

Re: MySQL Stops after starting it. XAmpp 7.4.7

Postby torvista » 25. March 2021 18:44

Thanks again. I think this will remain unresolved as I have been investigating Laragon and it is designed to use switchable, multiple versions of everything (apache, nginx, mysql, maria, php) all in the same installation.
It works, so no reason for me to have multiple Xampps anymore.
torvista
 
Posts: 18
Joined: 27. July 2009 04:15

Re: MySQL Stops after starting it. XAmpp 7.4.7

Postby Eradan » 25. March 2021 20:38

You're welcome, for what it's worth. Sorry you couldn't get it working with XAMPP, but I'm glad you've found a solution that does what you need it to. Good luck!
Eradan
 
Posts: 4
Joined: 24. October 2020 05:11
XAMPP version: 7.4.5
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 92 guests