Maintaining multiple installations of MySQL - mysql

I have two installs of MySQL: one is a custom installation of MariaDB, and the other came prepackaged with XAMPP. Ideally I'd like to keep both and run either at separate times (I have no reason to run them together - thus port conflicting shouldn't be an issue).
When I run my MariaDB install, it runs fine. When I try running XAMPP install, it warns me "MySQL Service detected with wrong path," and doesn't get past "Attempting to start MySQL service..." when I try to run MySQL.
It also says "Found Path:" detecting the path to my MariaDB install, and "Expected Path:" indicating the location of the install prepackaged with XAMPP. What I don't understand is how it's even finding my MariaDB install.
I'm guessing it's something simple - any help is appreciated!
Details:
Windows 10
MariaDB 10.2.11
XAMPP v3.2.2
EDIT:
A similar question is answered here. However, my issue is not that the ports are conflicting, since my MariaDB install is not running. Notwithstanding, I've tried the solutions provided there, and still to no avail.

Related

How to fix a broken MySQL installation?

Installing a PHP application that requires MySQL or MariaDB, I first installed MariaDB via 'apt install' from the MariaDB repos, but there were behaviours with the installation of the application that seemed to be caused by some kind of incompatibility. Calls to the DB were timing out, and although I could see it was creating the DB, it was impossible to set the application up in its setup routine.
So I used apt remove to get rid of MariaDB. I saw the application had a *.deb installer for all requirements (wish I'd seen this sooner!) and, after removing PHP and Nginx, I attempted to install it the normal way. Unfortunately, the MySQL portion of the installation failed with:
Automatic maintenance of MySQL Server daemon disabled.
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL Installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN
Unfortunately, /etc/mysql/FROZEN is a symlink to a non-existent file explaining downgrading. I can't run the uninstaller of the overall package or repair the installation with sudo --fix-broken install because the installer requires a MySQL password I can't provide it.
How can I fix my borked MySQL installation? If I could just get to a place to have MySQL run properly, understanding what left-overs perhaps from the MariaDB installation that I need to delete manually before trying to repair it, that would be helpful. FYI, the version of MariaDB was 10.3, and the version of MySQL the application package was installing was 5.7.
Any suggestions appreciated.

mysqld.exe - application error on Laragon start

I just installed Laragon but when it wants to start its services, it "freezes" when mySQL have to be launched, then shows me that message :
mysqld.exe - Application Error
This application was unable to start correctly (0xc000007b). Click OK to close the application.
After that, Laragon's window writes "initialize data..." then does not change until I stop all services.
I wanted to check the log files but... zero log. So impossible to have some details...
I've tried to uninstall and reinstall.
I've tried another version of mySQL.
None of them works. WAMP is also installed on my computer, but I don't really want to uninstall it (and I don't think that's problem since I have both at work).
I think MySQL 5.7 is not compatible with your OS.
You can try two options:
Copy your MySQL in WAMP to laragon\bin\mysql\
Use MariaDB

Should I reinstall Mysql?

I'm getting kind of desperate here trying to get mysql to work on osx lion.
I've been through nearly every article on the web these past few days looking for a way to fix the problem with the error.
When I try to start the server is gives this error:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
when I try to create a database with 'rake db:create' it gives the same error.
sometimes it says that or I get errors about "please install gem-blabhalbhabhlb". And that gem doesn't exist.
I was able to install mysql in terminal using the dmg version from mysql's site but after I deleted the installation files it just stopped working- as in when I run
rake cd:create
I get the mysql.sock error.
I'm going insane.. please help
For me I often need to force mysql to not use unix sockets, but regular php sockets.
To do this, connect to 127.0.0.1 instead of localhost. Works 90% of the time, all the time.
Major credit to John P. for helping me get this working last night
The first thing was to uninstall mysql using 'brew uninstall mysql'.
Then to install mysql from their development site. The community .dmg 64 bits version.
Then to find out where the path was pointing.
So in updating the paths he had to find where bin/mysql was and make sure bash_profile had it's path there.
PATH=$PATH:/usr/local/mysql/bin
The essential step after that was to 'source' the file so he had me run this command.
source ~/.bash_profile
From there mysql works flawlessly.

trouble installing mysql

Trying to follow this tutorial, but my installation of mysql is failing.
After getting to the last line(launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist), I get the following error:
launchctl:
CFURLWriteDataAndPropertiesToResource
(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist) failed: -10
It is worth noting that I originally had an error for the second to last line:
cp /usr/local/Cellar/mysql/5.5.15/com.mysql.mysqld.plist ~/Library/LaunchAgents/
but I noticed I did not have a /5.5.15/ folder, instead I had a /5.5.14/, which I used instead.
Also, I am only following the mySql part of the tutorial, the rest I had already done.
Incase it is relevant, I have used MAMP on this machine, but have shut it down and restarted to no avail.
That error seems to indicate a permissions problem. Your homebrew installation might be a bit messed up. I'd try uninstalling mysql via homebrew via "brew uninstall mysql" and then removing homebrew entirely and reinstalling. You could also try running this script to fix the permissions. If that doesn't work, I'd uninstall and reinstall.

What is forcing my system to look for MySQL in "/opt/local/var/run/mysqld/mysqld.sock"

I have been trying to get a ruby on rails app going on my machine for a little while now for a project I need to work on for work. The issue is, my system must be setting the default location of MySQL somewhere because every time I start the rails webserver (webrick) and run localhost:3000, I get the following error.
"Can't connect to local MySQL server through socket '/opt/local/var/run/mysqld/mysqld.sock' (2)"
I have deleted the installed version of mysql and removed all folders. I reinstalled mysql using BREW. I now have a running mysql instance. The output of "which mysql" prints "/usr/local/bin/mysql" which is actually a sim link to "/usr/local/Cellar/mysql/5.5.14/bin/mysql".
Does anyone know what might be forcing my rails apps to look for mysql in "/opt/local/var/run/mysqld/mysqld.sock"
NOTE: I deleted my current my.cnf because it was messing up the brew version of mysql I currently have running, so I know that is has nothing to do with that.
/opt/local is the default location for MacPorts-installed packages. Chances are you installed rails and or MySQL via MacPorts. Try:
sudo /opt/local/bin/port installed
to see what is installed.