Skip to content

Instantly share code, notes, and snippets.

@odan
Last active June 4, 2023 19:44
Show Gist options
  • Save odan/c799417460470c3776ffa8adce57eece to your computer and use it in GitHub Desktop.
Save odan/c799417460470c3776ffa8adce57eece to your computer and use it in GitHub Desktop.
XAMPP - Replacing MariaDB with MySQL

XAMPP - Replacing MariaDB with MySQL

This post has been deleted.

@devshark
Copy link

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

Does this guide implicitly requires that you have admin privileges before performing? If not, please help because I cannot start my MySQL service after performing the steps above. I got stuck at

Start the MySQL server. You can use the XAMPP Control Panel (MySQL > Start) to start the MySQL service.

I do not need to migrate old data from MariaDB.

@CreateWithCoding
Copy link

CreateWithCoding commented May 6, 2018

I fixed by copying the data directory from mariadb to mysql. I didn't need the old databases so I didn't copy at first. but there must be some things in that mariadb/data that is needed. Anyway it works now it appears.

The reason I changed over to MySQL by Oracle is because MySQL Workbench wouldn't work with MariaDB. I've been using MySQL Workbench for years and love it. I wasn't quite so impressed with MariaDB Workbench looking at it earlier today.

Same error as @devshark above

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

Thanks for putting this together @odan

@CreateWithCoding
Copy link

ah still not working. MySQL Workbench not liking it. screenshot below ...

image

@aymenbz
Copy link

aymenbz commented May 11, 2018

thank you so much

@odan
Copy link
Author

odan commented May 21, 2018

@yiiprogrammer @devshark

You can create a fresh data directory with this command:

cd c:\xampp\mysql
c:\xampp\mysql>bin\mysqld.exe --initialize-insecure --basedir=c:\xampp\mysql --datadir=c:\xampp\mysql\data

@EoghanH
Copy link

EoghanH commented May 24, 2018

May be useful to include a link to https://github.com/phpmyadmin/phpmyadmin/blob/master/sql/create_tables.sql

If the user decides against importing their old data, their phpmyadmin will break unless they run the above script :)

@addylov89
Copy link

I think you miss one folder (\bin) on the route
Create a new file: c:\xampp\mysql\my.ini and copy this content:

It should be
Create a new file: c:\xampp\mysql\bin\my.ini and copy this content:

@akaki1991
Copy link

I cant start mysql from xampp

@odan
Copy link
Author

odan commented Jul 24, 2018

@akaki1991

Make sure you have installed the 32-bit version of MySQL. The 64-bit version is not compatible with the XAMPP Control Panel.

@eemaano
Copy link

eemaano commented Aug 3, 2018

my.ini needs to be in /bin unlike original instructions - otherwise works
thanks @addylov89 for pointing that out

@cleitonoliveira
Copy link

Thank you for the tut, it helped me a lot. About the start/stop issue, @addylov89 solves it.

@projinitech
Copy link

Worked like charm. Replaced MariaDB 10.1.34 with MySQL 5.6.41.
Now MySQL Workbench works well with MySQL on XAMPP.
Thanks

@altrusl
Copy link

altrusl commented Sep 5, 2018

my.ini should be in the bin directory

@weratad
Copy link

weratad commented Sep 14, 2018

Yes move my.ini should be in the bin directory
Work now

@JustinDraude
Copy link

Worked like a charm. Cheers guys. my.ini does need to be in the bin directory, indeed.

@eyalroth
Copy link

eyalroth commented Mar 2, 2019

The MySQL server should be restarted after the mysql_upgrade.exe command, otherwise there might be errors.

See: https://stackoverflow.com/questions/6288103/native-table-performance-schema-has-the-wrong-structure

@Jakhongir91
Copy link

Is it possible to do the same for mac OS?

@Gegeenmedia
Copy link

Hello @odan, i faced mysqld.exe - System error.

The code execution cannot proceed because msvcr120.dll was not found. Reinstalling the program may fix this problem.
Please help me.

Thank you.

@bornemisza
Copy link

@akaki1991

Make sure you have installed the 32-bit version of MySQL. The 64-bit version is not compatible with the XAMPP Control Panel.

Worst news :(
Btw, would be great to see in the https://odan.github.io/2019/11/17/xampp-replacing-mariadb-with-mysql-8.html description
This answer sold my problem 👍

@loyison
Copy link

loyison commented Feb 27, 2020

I have followed all the steps its still not working,

The code execution cannot proceed because msvcr120.dll was not found. Reinstalling the program may fix this problem.

installed the 32 bit updated my.ini

@odan
Copy link
Author

odan commented Feb 27, 2020

@loyison The file MSVCR120.dll should be part of the Microsoft Visual C++ 2013 Redistributable Package

https://www.microsoft.com/en-us/download/details.aspx?id=40784

@michaelprankl99
Copy link

Links aren't working anymore

@enigmaelectronica
Copy link

Bad... The links are broken... maybe Takedown?

@odan
Copy link
Author

odan commented Oct 1, 2020

@enigmaelectronica Sorry, the page has been deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment