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).
Related
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.
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...
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.
I'm attempting (and failing) to upgrade MySQL on Mac OS X Server (Leopard) and running into trouble. Though the OS X Server docs say it's "normal" to have multiple versions of MySQL on your machine they don't go into any detail of how to "manage" them.
I have built and installed a newer version (5.1.40) than the original that Apple bundled (5.0.x).
Server Admin seems to manage only the initial (5.0.x) installation in /usr/bin
So I've STOPPED that version in Server Admin but can't get the new one (in /usr/local/mysql) to work.
Ideally I'd like to point the new version of mysql at the old database files in /var/mysql but not sure how...
Edit: Looks like my new MySQL is active (for some users anyway) but it's pointing to a different data file. It's pointing to /usr/local/mysql/data and I want it to point to /var/mysql
Admin user can connect but others get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). I'm assuming because this new database doesn't have those users enabled yet?!?! though I'd think I could still $ mysql -u root -p to it?!?
Anyone know how to manage this?
Well, I renamed the new MySQL's data directory to data.backup and then I created a symlink from where the new MySQL's data folder was to /var/mysql (where the old data file is) and so far so good... New version of MySQL is running and using the existing data file for its databases...
I'm not sure how to resolve your issue, but maybe you could trying using Homebrew or another OS X package manager to handle your software.
Will make upgrading in future a breeze.
EDIT: Sorry, just realized you are using OS X SERVER, I'm not familiar with it or if you should be using Homebrew on it.
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.