Archive for June, 2010

Mysqld_safe not starting mysql5?

// June 4th, 2010 // No Comments » // 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:

  1. Make sure you have ran the following command after the install completes:
    sudo /opt/local/lib/mysql5/bin/mysql_install_db  --user=mysql
    
  2. 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'

relearning the linux stack!

// June 3rd, 2010 // No Comments » // Announcement

Since I left academia, I have dove into the deep and started working with Microsoft tech. From now on I will still have to use Microsoft tech because of work, but I promise to maintain my skill levels in all the linux based work I used to do. First I will start by refreshing on my rails skills by checking out rails 3! This will force me to relearn Ruby and some new cool tools like Cucumber and Pickle. Man, this may sound nerdy, but I am excited at all the stuff that I will get to learn :)

-->

Categories