Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WAMP server switch MySQL to MariaDB

How can I switch the database from MySQL to MariaDB in WAMP 3.1.0?

I'm looking for it, but I can not find it.

enter image description here

like image 495
kevas Avatar asked Dec 14 '17 12:12

kevas


People also ask

How do I switch from MariaDB to MySQL in WAMP?

You must click on WAMP icon and go to MySql and from list select "Use a port other than (your port)" and set your port To "3306". Ok your default DB is Mysql and has green check.

How do I change the default DBMS in WAMP?

There's a solution that just requires right-clicking on the WAMP icon, go to "Tools" and click on "Invert default DBMS MariaDB <-> MySQL", that should work. It will set MySQL as a default engine, change the port numbers for you and restart the services all by itself.

Can I use MariaDB instead of MySQL?

In fact MariaDB is fully compatible with MySQL since it was (and still is) intended to be a perfect replacement for MySQL. A standard MySQL installation comes bundled with a couple of useful tools, such as mysqldump, which is helpful for backups. It can be used with both MySQL and MariaDB.


1 Answers

From the image you show it looks like both MySQL and MariaDB are already running!

NOTE: Thats a bit memory hungry!

Simple test to see if both MySQL and MariaDB are running. Launch phpMyAdmin and look at the login screen. If both are running you should see a Server Choise dropdown under the Username and Password fields. In there you will see 2 options like below.

enter image description here

To pick MySQL or MariaDB, right click on the wampmanager icon in the system tray and you should see this this menu

enter image description here

Just click on either MySQL or MariaDB to Enable or Disable either or both database servers. If there is a green tick beside the database server name, like above against MySQL, then that database server is configured to run, and if no tick exists, that server is not configured to run.

Alternatively, just look at the services.msc snap-in to see if the database server is a) installed and b) running (started)

Small note WAMPServer is now at V3.1.2, the update can be found here This contains a fix that if I remember correctly, contains a relevant fix. This is the WAMPServer backup repo, but it is a lot easier to navigate than SourceForge and is often more up to date than SourceForge as Oto does not have to jump through all the SourceForge loops to keep it up to date.

Also note: that MariaDB and MySQL cannot both run on the same port i.e. 3306. So by default MySQL runs on 3306 and MariaDB runs on 3307. When you come to write PHP code you will have to specify port 3307 on your database connection code to make the connection to MariaDB if you are going to run both at the same time.

Alternatively, if you want to use just MariaDB, Turn off MySQL and then switch MariaDB to use port 3306. There are menu items that make it quite easy if you look for them.

like image 125
RiggsFolly Avatar answered Sep 19 '22 05:09

RiggsFolly