WAMP server switch MySQL to MariaDB - mysql

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.

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.
To pick MySQL or MariaDB, right click on the wampmanager icon in the system tray and you should see this this menu
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.

Related

Why is mysql running when i am not using it?

I have used mySQL for a project in the past, and haven't used it for months. However, when i check my task manager 'mysql' is using about 100MB of RAM. This happens every times i reboot. Why is my sql running, or using memory when i don't need it. Is a server running in the background that i have to disable? For context i was using my SQL Workbench 8.0 when working on my project.
Open a command prompt window cmd.exe
Stop MySQL service: net stop mysql57 (or net stop mysql)
Go to your mysql server installation path, in my case: cd "C:\Program Files\MySQL\MySQL Server 5.7\bin\"
Execute mysqld.exe --remove
This will remove the MySQL Service.
Note that You may need an elevated command line prompt, for that press WIN-X select Command Prompt (Admin)
Yes, MySQL Server service would be constantly running in the background, if (because) this service's startup type was set on an "automatic start when computer starts" mode during the installation of MySQL Workbench. The comment by #Alejandro offers the finest explanation.
(below steps I had tried for MySQL 8.0.30 version, however shall work with nearby versions as well; as steps to stop the service might be generic.)
In Windows 10, to stop the MySQL Server's service, OR, change the startup-type setting of MySQL Server.
Open Windows Services panel via the Start menu, OR, Win+R -> type services.msc, do Enter.
Different Windows OS's services would be listed here, alphabetically.
Find the MySQL Service. For MySQL 8 versions, it's often by default name - MySQL80, unless you had named it by a custom name during installation.
Click STOP, to stop the service.
On the other hand, you may choose your desired Startup type. By default, you'll find it on Automatic type.
If you want to keep Manual type, make sure to start the service by coming at this Services wizard, before using MySQL Workbench. Otherwise, the workbench won't be able to recognize/find the server.
While installing the MYSQL Server, this check box is by default checked (shown in the picture). If you uncheck this, then you need to start your MYSQL Server manually.

Linking MAMP on Mac to a different instance of MySQL and phpMyAdmin

I am using macOS Sierra 10.12.2, MAMP 3.0.7.3.
I have been using MAMP with the MySQL it comes with for a while but I need to run something (Magento 2) that requires a higher version of MySQL than the version MAMP comes with, and I don't want to upgrade that instance of MySQL that comes with MAMP. So I am trying to install a different instance of MySQL for use on this project. I still want to use MAMP's Apache server with PHP to run the project though. I also still want to be able to switch back to the other instance of MySQL.
I am essentially trying to follow this tutorial, but I also want to install phpMyAdmin: http://www.human-element.com/installing-magento2-on-mac-for-local-development/
I have installed MySQL 5.6.35 to /usr/local/mysql/bin
The MAMP MySQL is at /Applications/MAMP/Library/bin/mysql
/Applications/MAMP/Library/bin/mysql --version is 5.5.38
mysql --version is 5.6.35
It seems to be installed correctly but I want to use phpMyAdmin for it, which is where I am having trouble. I downloaded phpMyAdmin 4.6.6 and installed it to /Applications/MAMP/htdocs/phpMyAdmin-4.6.6 (as I still need MAMP to run it). But it seems to be linking with the MAMP instance of MySQL and not the new instance of MySQL. I can only log in with credentials for the MAMP MySQL users and I see all my MAMP databases.
If I go to localhost/phpMyAdmin-4.6.6/setup I think the setup must be wrong but I'm not sure how to specify the other MySQL instance:
I tried changing the server socket path to /tmp/mysql.sock too - this had no noticeable effect.
I also have some symbolic links set up, although I admit I don't really understand what this is for...
cd /var/mysql/
# This one was set up before when I was just using MAMP:
mysql.sock -> /Applications/MAMP/tmp/mysql/mysql.sock
# This is the equivalent I set up (removing above one) for the new instance, but not sure if correct:
mysql.sock -> /tmp/mysql.sock
I've tried switching between both but it doesn't seem to have any effect on phpMyAdmin.
Can someone explain how I link the new version of phpMyAdmin with the new instance of MySQL?
Since you're essentially trying to run two MySQL instances at the same time, you have to make sure they're not using the same socket and TCP/IP port. These things are configured in the MySQL configuration file. I suggest not messing with the MAMP installed version, so edit the one you installed and make sure the port and socket path are different. Also make sure your data directory is different; you can't use the same datadir for two MySQL instances at the same time, and certainly not changing between versions, either. Once you have that sorted out, you can configure phpMyAdmin to connect to them both (you can define more than one server, based on port, hostname, and/or socket).

MySQL Workbench incompatible/nonstandard server

I am new to using MySQL and I needed to download it for school, however, I keep getting this error message (picture below). I am using xampp and connecting using the username root. the port also matches what it is telling me. It will let me proceed but a lot of the features are missing. Any help at all would be appreciated.
Incompatible/nonstandard server version or connection protocol
detected (10.0.10).
A connection to this database can be established but some MySQL
Workbench features may not work properly since the database is not
fully compatible with the supported versions of MySQL.
MySQL Workbench is developed and tested for MySQL Server versions 5.1,
5.5, 5.6 and 5.7
As I can see, You are using latest XAMPP.
All you need to do is, after opening MySQL Workbench, and instead of setting up a new connection, Press CTRL+R or click on DATABASE tab in the top menu. Select Reverse Engineer and provide necessary information. You are good to go now.
The MySql workbench wont crash or show any compatibility issue now.
The current version of XAMPP uses MariaDB instead of MySQL.
Because MySQL Workbench is designed to work with MySQL and not with the very similar drop in replacement MariaDB, you are gonna have problems ...
So, if you want to use MySQL Workbench with XAMPP then a solution would be to try installing the last version of XAMPP that uses MySQL. That version is probably 1.8.3 from (August of 2014?). You can download it here:
XAMPP Sourceforge old versions
If you are using the latest XAMPP that uses MariaDB, in that case in your MySQL Workbench don't use 'Connect to Database' instead use 'Reverse Engineer' and provide the necessary credentials. That's all, No hassle.
I encounter the same message followed by a crash of MySQL Workbench, with version 6.3.7 (build 1199).
I didn't find a solution, but here is a work-around:
Once you press the button Continue anyway, just open a database use toto, and then wait a bit (a minute is enough in my case), and then you can call a query without a crash. I found this trick here.
I experimented the same with WAMP 3.2.0.
MariaDB was configured to listen to port 3306 (the usal MySQL port) and MySQL 8 was listening on port 3308. If you are in this case, don't be fooled by the fact you have 2 DBs.
To solve this, you have to choose the DB you want. I wanted MySQL and I just ask MySQLWorkBench to open a connection on port 3308 to MySQL.
You can ditch MySQL Workbench, and use the browser made for the MariaDB, they have a free version here: https://www.upscene.com/downloads/dbw
It's limited in its abilities, but I had no troubles connecting and browsing.
I had the similar problem because i was using Denwer at the same time.
To solve the problem:
Stop Denwer
Restart MySQL server
Profit! Now you can open your database in the Workbench
The idea is that denwer was starting its local server which didnt allow MySQL to start normally.
If you want to use denwer at the same time wth MySQL you can just start it after MySQL (Point 4).
In my case I already had MySql server and workbench installed and setup prior to my XAMPP installation. I wanted to continue with my existing setup.
I also installed MySql server with my XAMPP. I started mysql inside XAMPP and when I connected to MySql Workbench, I encountered the same error. Because Workbench was trying to connect with the server which was installed with XAMPP, apparently this was incompatible.
So I stopped mysql in XAMPP and started started mysql server manually(the previous setup and installed server).
Refer this to know how to start mysql manually in windows.
You can also config XAMPP to use your existing SqlServer.
So I had the same problem. For me none of the methods worked, but then I found out that my MariaDB was occupying the same port, so I uninstalled it and that solved the problem.
i had same issue, i changed the mysql server port from 3306 to 3308 in XAMPP config file.
[mysqld]
port=3308

How to show different databases MySQL workbench?

I downloaded MySQL, and installed it correctly.
When I started the MySQL workbench it shows me these databases (I don't remember all of them):
sakila
test
world
It is ok, they are work, I can access them with no problems. But later I installed xampp, after that when start MySQL workbench it shows me different databases:
cdcol
phpmyadmin
test
webauth
I can't access the previous databases.
How to switch between them?, or
view them all?
Not sure whether xampp uninstalled your first server, but it is more likely that its installation changed the default MySQL TCP/IP port (3306). Maybe both servers try to run on the same port (which doesn't work) and one failed to start (in this case the first installation).
So what you need is to make each server run on its own port. You can use MySQL Workbench to make the necessary change. However first you need to check if still both servers are installed. Do you have 2 MySQL services running? Switch off one of them and connect with MySQL to the running server. If that works shut this down and run the other service. Connect again with MySQL but this time go to the admin section, config file, and change the port to e.g. 3307. Save and restart the server (all within WB possible). Now you should be able to run both servers at the same time (provided the first one runs still on the default port). Create a second connection and server instance in WB so that you can access one server at 3306 and the other at 3307
If there's only one MySQL service entry then xamp has removed the previous installation and you must install it again if you really need two servers.

Deleting MySQL LocalHost Server in MySQL Workbench

I set up a MySQL LocalHost server on my computer a few weeks ago. I've been testing some code on the server, but now I'd like to delete it. When I open up my MySQL Workbench Workspace view, the server LocalHost pops up under the "Server Administration" and "Open Connection to Start Querying" sections. I right click on the LocalHost listings under both sections and delete them. Unfortunately, when I restart MySQL Workbench, the LocalHost instance I deleted from the previous session pops back up. How do I permanently get rid of the LocalHost instance in my MySQL Workbench Workspace view?
MySQL Workbench will load the localhost server instance by default. As of Workbench 5.2.40 there does not seem to be a way to disable this action.
If you truly do not wish to see the server in Workbench then I am assuming you are no longer using the localhost server as you said it was for testing anyways. If you uninstall the server from your machine then it will no longer show up in Workbench. However, given the small footprint of two list items (for the server and the connection) it hardly seems worth getting bothered over IMO.
As of Workbench 6, the local connections are no longer automatically added after a restart. However, to add them, right-click on the Workbench Home screen and select "Rescan for Local MySQL Connections" from the context-menu.