The Video is available in HD
āĻŽāĻžāĻā§ āĻŽāĻžāĻā§āĻ āĻāĻŽāύ āĻšā§ āϝ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞā§āϰ āϰā§āĻ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻā§āĻā§āĻ āĻĒāĻžāĻā§āĻž āϝāĻžāĻā§āĻā§ āύāĻž āĨ¤ āĻŦā§āĻļā§āϰāĻāĻžāĻ āĻā§āώā§āϤā§āϰā§āĻ āĻĻā§āĻāĻž āϝāĻžā§ āϏāĻžāϰā§āĻāĻžāϰ āĻĒā§āϰāĻĨāĻŽāĻŦāĻžāϰ āϏā§āĻāĻžāĻĒ āĻāϰāĻžāϰ āϏāĻŽā§ āĻŦā§āĻļ āĻļāĻā§āϤ āĻĒā§āĻā§āϤ āϰā§āĻ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āϏā§āĻ āĻāϰāĻž āĻšā§, āĻāϰāĻĒāϰ āύāĻŋāĻā§āϰ āĻā§āϝāĻžāĻĒā§āϞāĻŋāĻā§āĻļāύ āĻāϰ āĻāύā§āϝ āύāϤā§āύ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻāĻāĻāĻžāϰ āϤā§āϰāĻŋ āĻāϰ⧠āύā§āĻ āĨ¤ āϰā§āĻ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄāĻāĻž āĻā§āĻĨāĻžāĻ āύā§āĻ āĻāϰ⧠āύāĻž āϰāĻžāĻāϞ⧠āĻĒāϰāĻŦāϰā§āϤā§āϤ⧠āĻāĻāĻž āĻāϰ āĻŽāύ⧠āĻāϰāϤ⧠āĻĒāĻžāϰāĻŋ āύāĻž āĨ¤ āĻāϰāĻāĻŽ āĻĒāϰāĻŋāϏā§āĻĨāĻŋāϤāĻŋāϤ⧠āϰā§āĻ āĻāĻāĻāĻžāϰā§āϰ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄāĻāĻž āϰāĻŋāϏā§āĻ āĻāϰāĻž āĻāĻžā§āĻž āĻā§āύ āĻāĻĒāĻžā§ āĻĨāĻžāĻā§ āύāĻž āĨ¤
āĻāĻ āĻŦā§āϞāĻ āĻĒā§āϏā§āĻā§ āĻāĻŽāϰāĻž āĻĻā§āĻāĻŦā§ āĻāĻŋāĻāĻžāĻŦā§ āĻāĻŽāϰāĻž āϏāĻšāĻā§āĻ āĻāĻŦā§āύā§āĻā§āϤ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞā§āϰ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āϰāĻŋāϏā§āĻ āĻāϰ⧠āύāĻŋāϤ⧠āĻĒāĻžāϰāĻŋ āĨ¤ āϝāĻĻāĻŋāĻ āĻāĻŦā§āύā§āĻā§āϰ āĻāύā§āϝ āĻāĻŽāĻžāύā§āĻĄ āĻā§āϞ⧠āϞā§āĻāĻž, āĻāĻā§āϞ⧠āĻĄā§āĻŦāĻŋā§āĻžāύ āϞāĻŋāύāĻžāĻā§āϏā§āĻ āĻāĻžāĻ āĻāϰāĻžāϰ āĻāĻĨāĻž āĨ¤ āĻāϰ āĻ āύā§āϝ āĻā§āύ āĻĄāĻŋāϏā§āĻā§āϰā§āϰ āĻā§āώā§āϤā§āϰ⧠āϏāĻžāĻŽāĻžāύā§āϝ āĻĒāϰāĻŋāĻŦāϰā§āϤāύ āĻāϰāĻž āϞāĻžāĻāϤ⧠āĻĒāĻžāϰ⧠āĨ¤
āϰā§āĻ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āϰāĻŋāϏā§āĻ āĻāϰāϤ⧠āĻā§āϞ⧠āĻāĻŽāĻžāĻĻā§āϰ āĻĒā§āϰāĻĨāĻŽā§āĻ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻāϰ āϏāĻžāϰā§āĻāĻŋāϏ āĻŦāύā§āϧ āĻāϰāϤ⧠āĻšāĻŦā§ āĨ¤ āĻāĻŦā§āύā§āĻā§āϰ āĻāύā§āϝ:
1 |
sudo service mysql stop |
āĻ āĻĨāĻŦāĻž, āĻĄā§āĻŦāĻŋā§āĻžāύ āĻāĻŦāĻ āĻāĻŦā§āύā§āĻā§ āĻĻā§āĻā§āϤā§āĻ āĻāĻžāĻ āĻāϰāĻŦā§ āĻāĻ āĻāĻŽāĻžāύā§āĻĄāĻāĻŋ:
1 |
sudo /etc/init.d/mysql stop |
āĻāĻŦāĻžāϰ āĻāĻŽāĻžāĻĻā§āϰ āϝā§āĻāĻž āĻāϰāϤ⧠āĻšāĻŦā§ āϤāĻž āĻšāϞ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻāϰ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻā§āĻ āĻāϰāĻž āĻšā§ āϝā§āĻ āĻā§āĻŦāĻŋāϞāĻāĻž āĻĨā§āĻā§, āϏā§āĻāĻŋāĻā§ āϏā§āĻāĻŋāĻĒ āĻāϰ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻāĻžāϞ⧠āĻāϰāĻžāĨ¤ āĻāĻāĻž āϏā§āĻāĻŋāĻĒ āĻāϰāϞ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻāϰ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻā§āĻ āĻāϰāĻŦā§ āύāĻž āĻāĻā§āϰ āĻŽāϤ āĻāϰā§āĨ¤ āĻĢāϞ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻ āĻāĻŽāϰāĻž āϰā§āĻ āĻā§āϝāĻžāĻāĻžāĻāύā§āĻ āĻ āĻā§āϝāĻžāĻā§āϏā§āϏ āĻāϰāϤ⧠āĻĒāĻžāϰāĻŦā§ āĻā§āύ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻāĻžā§āĻžāĻ āĨ¤
1 |
sudo mysqld --skip-grant-tables & |
āĻāĻāĻŦāĻžāϰ āĻāĻ āĻāĻŽāĻžāύā§āĻĄāĻāĻŋ āϰāĻžāύ āĻāϰāĻŋ:
1 |
mysql -u root mysql |
āĻāĻ āĻāĻŽāĻžāύā§āĻĄāĻāĻŋ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āϏāĻžāϰā§āĻāĻžāϰ⧠āĻāĻžāύā§āĻā§āĻ āĻāϰāĻŦā§ āĻāĻŦāĻ mysql āĻĄāĻžāĻāĻžāĻŦā§āĻāĻāĻāĻŋ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻžāϰ āĻāύā§āϝ āϏāĻŋāϞā§āĻā§āĻ āĻāϰāĻŦā§ āĨ¤
āĻāĻāĻŦāĻžāϰ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻĒāϰāĻŋāĻŦāϰā§āϤāύ āĻāϰāĻžāϰ āĻĒāĻžāϞāĻž āĨ¤ āĻāĻāĻžāϰ āĻāύā§āϝ āĻāĻŽāϰāĻž āĻāĻ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āĻā§ā§ā§āϰāĻŋāĻāĻž āĻāĻžāϞāĻžāĻŦā§:
1 |
UPDATE user SET Password=PASSWORD('NEW_PASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit; |
āĻāĻ āĻā§ā§ā§āϰāĻŋ āĻāĻŽāĻžāĻĻā§āϰ āϰā§āĻ āĻāĻāĻāĻžāϰā§āϰ āĻāύā§āϝ āύāϤā§āύ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ (āĻāĻā§āώā§āϤā§āϰ⧠NEW_PASSWORD) āĻā§āϝāĻžāϏāĻžāĻāύ āĻāϰāĻŦā§, āĻĒā§āϰāĻŋāĻāĻŋāϞā§āĻ āĻĢā§āϞāĻžāĻļ āĻāϰāĻŦā§ (āϏāĻšāĻ āĻāĻžāώāĻžā§ āĻĒāĻžāϰā§āĻŽāĻŋāĻļāύ āϰāĻŋāϞā§āĻĄ āĻāϰāĻŦā§) āĻāĻŦāĻ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āϏāĻžāϰā§āĻāĻžāϰ āĻĨā§āĻā§ āĻĄāĻŋāϏāĻāĻžāύā§āĻā§āĻ āĻāϰāĻŦā§ āĨ¤
āĻāĻŽāϰāĻž āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞā§āϰ āĻĒāĻžāϰā§āĻŽāĻŋāĻļāύ āĻā§āĻ āĻā§ āĻĢāĻžāĻāĻŋ āĻĻāĻŋā§ā§ āϰā§āĻ āĻāĻāĻāĻžāϰā§āϰ āĻāύā§āϝ āύāϤā§āύ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āϏā§āĻ āĻāϰ⧠āĻĻāĻŋā§ā§āĻāĻŋ āĨ¤ āĻāĻāύ āĻāĻŽāϰāĻž āύāϰāĻŽāĻžāϞāĻŋ āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āϏāĻžāϰā§āĻāĻžāϰ āĻāĻžāϞāĻžāϞā§āĻ āύāϤā§āύ āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻāĻžāĻ āĻāϰāĻŦā§ āĨ¤ āĻāĻāύā§āϝ āĻāĻŽāϰāĻž āĻāĻŽāĻžāĻĻā§āϰ āĻāĻāĻā§ āĻāĻā§ āϰāĻžāύ āĻāϰāĻž mysqld āĻĒā§āϰāϏā§āϏāĻāĻŋ āĻāĻžāϰā§āĻŽāĻŋāύā§āĻ āĻāϰ⧠āĻŽāĻžāĻāϏāĻŋāĻā§ā§ā§āϞ āϰāĻŋāϏā§āĻāĻžāϰā§āĻ āĻĻāĻŋāĻŦā§ āĨ¤
1 2 |
sudo killall mysqld sudo service mysql start |
āĻŦā§āϝāĻžāϏ, āĻāĻāύ āĻāĻŽāĻžāĻĻā§āϰ āύāϤā§āύ āϏā§āĻ āĻāϰ⧠āĻĻā§āĻā§āĻž āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄāĻ āĻāĻžāĻ āĻāϰāĻŦā§!
In one of my old posts, I noted short documentation on how to get started with the AMP stack on Mac OS X Lion. In that setup, I was using the default PHP and downloaded MySQL from the mysql website. In this post, I am going to describe how I used homebrew to setup my AMP environment with ease!
The Homebrew Magic
Homebrew is a cool tool for Mac OS users. Written in Ruby, this beautiful tool works as a package manager for Mac OS. Unlike Mac Ports or Fink, homebrew takes less space, uses the default os x tools to compile everything to a custom location. This makes life suck less and clutter free!
To install PHP 5.4 branch using homebrew, just issue this command:
1 2 3 |
brew tap josegonzalez/php brew update brew install php54 |
PS: If you want to customize the installation (like installing the mysql module by default) add necessary configuration options. Using the “bash-completion” formula from brew, you can hit tabs to see available installation options.
To view information on your PHP 5.4 installation via brew, type in:
1 |
brew info php54 |
Seperate MySQL Installation: Where is the ctl?
I have installed MySQL separately. I added the mysql and mysqldmin to my bash_profile like this:
1 2 |
alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin |
And to start/stop/restart mysql server, I added:
1 |
export mysqlctl=/Library/StartupItems/MySQLCOM/MySQLCOM |
That allows me to do:
1 |
sudo $mysqlctl restart |
Using PEAR
Homebrew installs all the PEAR packages to “/usr/local/Cellar/php54/5.4.3/lib/php”. So, I added it to my php include_path.
For PEAR to work correctly, we need sudo. If there are tools involved in the pear setup which can be run from command line (eg. phpunit), the binary files are stored in: “/usr/local/Cellar/php54/5.4.3/bin”.
I added the above path to my .bash_profile for convenience đ