Migrate MySQL from Mamp to Default MySQL Server - mysql

I found OSX MySQL only reachable when I using MAMP in port 8889 for some reason, also I can not access them via MySQL CLI also, why? I've tried to add new IP tables and even stop the firewalls, but it still not work, CLI is a bit useless now. We already backup all the databases but don't know what is the safest steps to replace the current MySQl (MAMP) with pure MySQL or MariaDB and it's default server without reinstalling the OSX. Thanks.

Related

Can I use the same port on both MySQL Server and XAMPP?

Despites I've already installed XAMPP, I am trying to upload my database via MySQL server 5.7.17 since it's too big but both it and XAMPP use the same port - 3306. MySQL server is not even allowing me to continue to install it unless I make a change
SOrry, I'm a newbie.
Screenshots
Note It was suggested to me to download MySQL Server since I had already installed XAMPP but it didn't help me to upload my database.
No. If port 3306 is in use by an already installed and running MySQL instance, then another MySQL instance cannot use that same port. It is possible to run MySQL on a port other than the default 3306. But before we go there...
I think we might be barking up the wrong tree, trying to install another copy of MySQL and to run two instances of MySQL. Maybe we are wanting to run a different version of MySQL, other than the version other than what is included in the package we already installed.
But back pedal a bit here.
How is it that we reached the conclusion that installing another copy/version of MySQL was a viable solution to the problem we encountered?
It seems like we want to figure out the root cause of the original problem, before we chase down the wrong rabbit trail...

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).

How to make phpmyadmin to use MySQL server instead of the wampserver64 default one

I have installed both wampserver64 and MySQL server 5.7. The MySQL service from wampserver64 on port 3307 and MySQL server 5.7 on 3306. After trying the androidhive tutorial for connection android app to remote mysql database (which never worked). I noticed that databases created with phpmyadmin doesn´t show up on MySQL server 5.7 and viceversa.
How can i "force" wampserver64´s mysql service to use MySQL server 5.7 that´s on port 3306?
I think changing this line will...
...but my MySQL server 5.7 has no data folder on it (i´ve installed and reinstalled mysql server many times, dont know where is it)
You absolutely should not share the data dir with two MySQL installations that are running at the same time. That can lead to corrupted databases and missing data.
You can configure your phpMyAdmin to talk to both MySQL instances by adding another server in the configuration file, config.inc.php.
If you want to make wampserver use the other MySQL installation completely, the proper way to do so is to edit the configuration files of wampserver to point to the other MySQL server's port or socket rather than to have the two MySQL services share the same datadir.

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

Using XAMPP Install of MySQL with Netbeans 6.8/MySQL Workbench

All,
For all of this I am using Mac OSX Snow Leopard.
I have happily used XAMPP to develop PHP backed sites in the past with no problems(as you'd expect for such a simple to set up package). I am now trying to set up this MySQL install in Netbeans 6.8 (for now just trying to get a sample database backed webapp to run). My issue is that even though MySQL has been started I cannot connect to it at 127.0.0.1 on port 3306 (which it is set up to use).
I have read that the issue is that XAMPP holds MySQl.sock in /Applications/XAMPP/xamppfiles/... whereas MySQL Workbench and Netbeans expects to find it in /tmp/MySQL.sock. Is this correct? I've tried to set up a symbolic link from /tmp to the xmapp directory but this doesn't appear to have changed anything.
Is there anything else I can try/anything that I am missing?
I upgraded from an older version of XAMPP to 1.7.3 and encountered a the same problem, I got MySQL Workbench to connect if I edited the my.ini file and:
changed the socket parameter to:
socket = "TCP/IP"
made mysql bind to an IP address or all IP as in the case below:
enable-named-pipe
bind-address=0.0.0.0
This requires that you disable named-pipe (as shown above)
I could not get this to work. So in case anyone else is reading this and wondering what happened... I installed a non XAMPP instance of the MySQL database and am using that now instead. Less than ideal but it works.