Mysqld_safe not starting mysql5?
// June 4th, 2010 // Tips and Tricks, development
So I use macports to install mysql5 and when I was ready to start mysql using mysqld_safe, which is located:
/opt/local/bin/
I ended getting a big error report which said something along the lines of:
mkdir: /opt/local/var/run: No such file or directory chown: /opt/local/var/run/mysql5: No such file or directory chmod: /opt/local/var/run/mysql5: No such file or directory
Solution
I solved this by doing the following:
- Make sure you have ran the following command after the install completes:
sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
- Finally you have to do the following:
sudo mkdir /opt/local/var/run sudo chmod g+w /opt/local/var/run/ sudo mkdir /opt/local/var/run/mysql5 sudo chown mysql /opt/local/var/run/mysql5/
Now you should be able to start mysql with no problems! A little bonus is create alias for starting and stopping mysql. My MBP is running Snow Leopard so I edit:
~/.profile
and add the following at the end of the file:
alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 &' alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown'
Leave a Reply
- lazy said: thanks nice site http://csharptalk.com ...
- mez said: I have decided to hold off on this, cause the lang...
- Adam said: Taxes are easy for you and me, but when you start...
- az said: lol- I remember those days. Just remember to keep...
- Wei said: Hey.This is Cool ^0^...
- mez said: thanks took a while to figure out how I wanted to...
.NET
Bitwise operators
C++
code generator
Cucumber
development
Diet
dlls
filing taxs
Google App Engine
HIVE
HPDC
hulu
install
iPhone
Issues
Lifting
LINQ
Mephisto
muse
NET 3.0
NET 4.0
Objective-C
ohio tax
Optimize
Panda3D
partials
Pickle
PRISM 4
python
Rails
Rails 3
Research
Ruby
running
tax
Wordpress
Work Out
WPF
yoga



