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.
Related
I'm getting pretty desperate because of mysql...
Two months ago I started working on Ubuntu and we have a project at university, where we have to maintain a webapplication written in Java with the Spring Framework. For this I needed to set up a local mysql server and for the application to work, the root password had to be empty...
However the problems started right away. Although I left the password empty on installation, the app threw an error because it couldn't connect to the mysql server. After trying all commandline password change methods on the internet I finally got it to work somehow.
But after a couple of day the same error occured again!! It seems like somehow mysql has changed the password on its own, maybe because it doesn't like it to be empty. The second time I had a pretty hard time resetting it, because nothing would work. For example if I tried to run:
sudo dpkg-reconfigure mysql-server-5.7
I simply got:
This installation of MySQL is already upgraded to 5.7.16, use --force if you still need to run mysql_upgrade
Using --force didn't help either. So in the end I settled for completely removing mysql and installing it again. This time I would provide a valid password and then install the mysql workbench and change the password in the workbench to empty.
This worked for about three weeks, but now I can't access the server again!!! I don't want to reinstall mysql twice a month!
I don't think the problem is with the application, because on my windows laptop I don't have any problems.
On Ubuntu im using Mysql-Server-5.7.
I hope someone can help me I'm really desperate...
Please don't post this question as duplicate. I am trying to configure mysql for about 3 weeks now. Someone should really help me.
I recently installed MySQL 5.1 in a Lenovo laptop to do my project. The laptop is running on Windows 8.
The installation was fine but when I tried to configure MySQL it worked till the last page.
There am getting Error Nr 2003.
I tried it through the command prompt, through services in the control panel. But the problem is that the mysql service is not starting at all. Why it is not starting ? What will be blocking it from starting ?
First you need to start mysql service it is the problem for this above
error.
In case you cant start mysql service means you need to install mysql service.
Steps for install mysql service
Step 1: open command prompt and go to the mysql installed location (for example c:\Program Fiels\MYSQL\Mysql Server5.0\bin\)
Step 2: mysql --install
Step 3: start mysql service using the command NET START MYSQL command
then connect mysql using username and password.
Assuming the service is already running and you still get this error connecting to the localhost using the mysql client, then make sure you have an entry for "localhost" in your hosts file. This was the case I experienced.
I resolved this situation following the following process. After adding the MySQL path to the environment, I kept invoking the program and then checking Event Viewer in the Application Log for MySQL errors that referenced old commands in the ini file. After removing them, what was hanging me up was that the installer was looking for errmsg.sys in a folder that didn't exist, \bin\share. Those folders DO exist, but on the same level, not nested. So I added the folder share to bin and copied errmsg.sys from share to the new nested share, and it worked.
Now that its running, I intend to redo a proper configuration using the workbench, just to gets my ducks in a row.
hth
Go to Run type services.msc. Check whether MySQL services is running or not. If not, start it manually. Once it started, type mysqlshow to test the service.
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.
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.
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.