Skip to main content

Posts

Showing posts from January, 2014

Laravel XAMPP MySQL artisan migrate install error mysql.sock

In my previous post I wrote about setting up Laravel 4 on Mac with XAMPP . When I tried to use migrations (using artisan) I faced some issue. I will also post about Laravel migrations soon.    php artisan migrate:install Error :                                                     [PDOException]                                       SQLSTATE[HY000] [2002] No such file or directory                                              Solution : We need to tell artisan which mysql we want it to use. For this to work we need to porivde it with mysql.sock which we want it to use. So change your database settings like this: 'mysql' => array( 'driver'    => 'mysql', 'host'      => 'localhost',     'unix_socket' => '/Applications/xampp/xamppfiles/var/mysql/mysql.sock', 'database'  => 'wedding', 'username'  => 'root', 'password'  => '', '

Working with MySQL on MAC. GUI Client, Web Based and Terminal

MySQL is most popular open source relational database. I have been using it myself for my PHP, Python and Ruby projects. Obviously, we need some client(s) to access MySQL database. In this post I am going to list down few clients.  Environment: I am using XAMPP on Mac. You can install MySQL separately if you want to. 1. Desktop GUI client Use SequelPro it is a nice tool and free.  Set it up and you are ready to go. 2. PHPMyAdmin phpMyAdmin is a free software tool written in  PHP , intended to handle the administration of  MySQL  over the Web. It gets setup with XAMPP.  3. Terminal Open up terminal and execute following commands -  Go to the directory with mysql binaries cd /Applications/XAMPP/xamppfiles/bin; Access mysql command line tool using ./mysql --user=root --password=

Setting Up Laravel 4.x on Mac OSX 10.8+ with XAMPP installed

I am new to PHP and have coded earlier with CodeIgniter. It is really easy to get started with CodeIgniter as it is light but powerful and has less features. As CodeIgniter is slowly phasing out I thought of moving to Laravel. Yes, it is powerful and AWESOME!!!  Lets get down to business.  1. Install composer I was doing it for the first time and faced issues: Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again: The detect_unicode setting must be disabled. Add the following to the end of your `php.ini`: detect_unicode = Off A php.ini file does not exist. You will have to create one. I was clueless at this moment and started to search. After some search I found an article which tells about setting up AMP (Apache, My SQL and PHP) environment . While going through it I realized that I have Apache already installed on my system (I am new to Mac too). I followed the steps to configure i