On Mac I Can't Connect to MySQL Getting Error #2002

I’m on a mac and I updated my version of PHP and installed the GD library.

The problem is that I needed up date my connection to the database or something to that affect so I ran this command line:

sudo mkdir /var/mysql
sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock

And it worked… but then I restarted my computer and now I can’t connect and I’m getting the error I had of…

#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)

So I tried the above two lines of code and it said those files/directory exist.

So what do I need to do here to change this permanently?