trouble installing mysql - 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.

Related

Maintaining multiple installations of 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.

homebrew: MySQL not starting, Can't update PID file

I am a new Mac user and trying to set up the development environment with Apache, PHP and MySQL. Initially, after a lot of installs and reinstalls i succeeded in installing MySQL (Apache and PHP came bundled with Mac) but now again mysql refuses to start up and gives the error, The server quit without updating PID file (/usr/local/var/mysql/Nikhils-MacBook-Pro.local.pid).
I have literally gone through entire SO questions regarding this problem but have not found a way to fix this and i mean i have done everything to start this but in vain. I have created the PID file too but it disappears in moments, i did a cleanup and reinstall using this SO Question but it has failed YET again. Please, i need to get my server started, i am really losing on to serious work and time.
Is there any other miraculous way to fix this unattainable feat? Also, if anyone asks what is the error in the log files, please don't as there is no log being registered as the server hasn't started yet.
I’ve got a similar problem with MySQL on a Mac (Mac Os X Could not startup MySQL Server. Reason: 255 and “ERROR! The server quit without updating PID file”) and after a long trial and error process, finally in order to restore the file permissions, I’ve just do that:
launch the Disk Utilities.app
choose my drive on the left panel
click on the “Repair disk permissions” button
This did the trick for me. Hoping this can help someone else.
brew install mysql on mac os
These instructions helped me. There was a my.cnf in /usr/local/opt/mysql/ which seems to have been the problem for me. YMMV.

Trouble installing MySQL on Osx Mountain Lion

I'm trying to brew install MySQL on Osx 10.8.3.
I've found some posts recommending using the dmg, but I need to use the mysql2 gem, and I've read that it is better to use brew.
I've tried everything from the top two answers here:
brew install mysql on mac os
and tried this tutorial, but I still get this error:
Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Thomass-MacBook-Pro-5.local.pid).
MySQL still runs (I don't really understand why), but trying to create a database gives this error:
ERROR 1006 (HY000): Can't create database 'asdf' (errno: 2)
I'm very much at a loss about what's going on, can anyone tell me what the issues here might be?
It appears that your database is either locked, or not started properly. I would suggest checking the PID at (/usr/local/var/mysql/Thomass-MacBook-Pro-5.local.pid) and either kill the process through terminal or from the PID File itself. As long as the PID is still there (whether it's asleep/zombied) you wouldn't be able to update/create a database.
You may also want to try rebooting your comp if you haven't done this step already.

MAMP Pro Error: The MySQL configuration file my.cnf couldn't be written

I tried to use MAMP Pro to replace previous XAMPP on my Mac due to its easy Virtual Hosts management. However after I installed it. The MAMP, basic version works, but the Pro version keeps given me this error message:
The MySQL configuration file my.cnf couldn't be written.
I googled for a while and there are some different solutions, like create my.cnf on /etc/, but none of these works. Also the error log is empty.
Has someone encountered this before? Or does anyone have a clue how could I solve this problem? Thank you!
I just purchased MAMP PRO and I'm having this error as well. Here's what "fixed" it:
Open Terminal and type in sudo killall -9 mysqld. You might see "No matching processes belonging to you were found," which is fine, it means that MySQL was not running.
Now, in Applications, look for the regular MAMP folder. Open MAMP here and click Start Servers
Now open MAMP PRO and the servers should be started
This is just a work-around, it definitely should not require these. At the very least, this should get you up and running.
Contacting support!
File -> Reset to Factory Settings
Possibly a permissions issue, but I wasn't able to resolve it. The above fixed it for me.
uninstall mamp.
remove all files about mamp.
reinstall mamp.
I removed 'my.cnf' from '/etc' directory. Restarted MAMP pro. Started server successfully.....
Your configuration may be wrong.
exp.
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # success
or
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' # error

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.