- #Mac os x mysql client free mac os x#
- #Mac os x mysql client free install#
- #Mac os x mysql client free code#
- #Mac os x mysql client free password#
- #Mac os x mysql client free free#
After looking in the config file in /Applications/MAMP/conf/php5/php.ini, if I had used the php binary that came with MAMP, I am 99% sure I would not have seen this error. I just now noticed that I am using the PHP binary from the /usr/bin directory. Note: I think I got this error message because I invoked the cake bake script using the wrong PHP binary(!). Once I ran these commands, the CakePHP cake bake script worked just fine. Sudo chown _mysql /private/tmp/mysql.sock
Sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /private/tmp/mysql.sock I just ran the following commands to create a link to the MAMP MySQL socket from the /private/tmp/mysql.sock location it was complaining about, like this:
#Mac os x mysql client free mac os x#
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/private/tmp/mysql.sock' (2) in /Applications/MAMP/htdocs/caketest1/cake/libs/model/datasources/dbo/dbo_mysql.php on line 374įortunately - since I had been down this road with MySQL and Mac OS X before - solving this problem was no big deal.
#Mac os x mysql client free code#
This command actually starts up okay, but when I tried to generate the code for a CakePHP controller, I got the following error message:
Once I got into MySQL, everything about MAMP and CakePHP worked just fine, until I tried to run the CakePHP cake bake command.
#Mac os x mysql client free password#
The MAMP MySQL root password is " root" Solving the MAMP/PHP/MySQL/CakePHP error That makes for a nice segway to MAMP MySQL important tip #2: If you just need to access the MAMP MySQL server, just add the MAMP "bin" directory to your Mac/Unix PATH variable. Note: I created this alias because 90% of the time I need my other MySQL server running. This way, in the future, all I had to do was type this command:Īnd then supply the MySQL root password, and I was in. Applications/MAMP/Library/bin/mysql -u root -pīecause I don't like typing long commands out like that on a regular basis, I created an alias for this command, like this:Īlias my="/Applications/MAMP/Library/bin/mysql -u root -p" The MAMP MySQL client is installed in the /Applications/MAMP/Library/bin directory, so to invoke that client and log into your MAMP MySQL database as the root user, you can invoke the MySQL client like this: In my case, because I already had MySQL installed on my Mac, I ran into a few errors until I realized this. The most important thing to know is that you need to use the MySQL command line client that came with MAMP. If you're going to use the MAMP MySQL client from the command, here's a quick tip that can save you some time. In the GUI, just click the MAMP menu item, then select Preferences, and change the ports as desired. If you want to change those, you can easily change them through the MAMP GUI. One quick note all MAMP developers need to know: By default MAMP runs Apache on port 8888, and MySQL on port 8889. However, since I do work from the Mac command line I had to make a couple of quick changes to my environment to get MySQL and the CakePHP "bake" script to work properly. If so, here's what it looks like when you start it: In fact, if you don't work from the Mac OS X command line (i.e., the Terminal), MAMP might be 100% complete.Īssuming you don't work from the command line, you might be ready to use MAMP.
#Mac os x mysql client free install#
Just download MAMP and install the MAMP folder in your Mac Applications folder, and you're almost ready to start your Mac/Apache/MySQL/PHP project.
#Mac os x mysql client free free#
Mac LAMP development with MAMP (Mac OS X, Apache, MySQL, and PHP)įirst of all, MAMP is a terrific, free all-in-one Mac LAMP/PHP solution. In this article I'll demonstrate how I got MAMP to work for my Mac LAMP needs, in particular working through a couple of issues not covered in the MAMP installation docs, and also using MAMP with CakePHP. The reason I can comfortably say "I'll skip all the details here" is because I recently started using MAMP for my Mac PHP MySQL development, and I have no plans on looking back to the old days any time soon. I'll skip most of the details here, but getting Apache and PHP to work involves modifying the Apache configuration files under /private/etc/apache2 or /private/etc/httpd, and also getting past some Mac/MySQL/PHP socket errors I ran into. When it comes to PHP development on Mac OS X, I've always battled my way through getting Apache, MySQL, and PHP on the Mac to work the way I needed them to. PHP LAMP Mac FAQ: Can you recommend a good way to develop Mac PHP/LAMP applications on Mac OS X? A $2 donation will help keep this site running!