How to create virtual hosts in MAMP?

While googling, I found these steps to easily create virtual hosts on MAMP: Open your console in mac and edit your hosts file like this sudo vim /etc/hosts This opens a system file that contains the following line: 127.0.0.1 localhost add your desired host name after local host: 127.0.0.1 localhost mysite.loc press ESC, then :wq! … Read more

Restoring deleted ‘root’ user and password for MySQL

I have a quick and dirty way Get someone with SysAdmin rights and do the following: Add ‘skip-grant-tables’ to my.cnf under the [mysqld] section restart mysql type mysql with no password and hit enter Run This: DELETE FROM mysql.user WHERE user=”root” AND host=”localhost”; INSERT INTO mysql.user SET user=”root”, host=”localhost”, password = Password(‘whatevernewpassword’), Select_priv = ‘y’, … Read more

Configuring MAMP for SSL

If you’re using MAMP 3 or 4 the instructions are slightly different. Here’s what worked for me, starting from a fresh install of MAMP 3.0.5 on Mavericks without Pro. Update: Still works on Yosemite after fixing Apache as described in this answer. Further Update: Comments suggest this still works at least through MAMP 5.4. Generate … Read more

How to run a PHP script from the command line with MAMP?

Please note that with version 2.0.5 of MAMP, the path has changed. It is now one of the following: /Applications/MAMP/bin/php/php5.2.17/bin/ /Applications/MAMP/bin/php/php5.3.6/bin/ Therefore the command to add MAMP’s php command should probably look like this: export PATH=/Applications/MAMP/bin/php/php5.2.17/bin/:$PATH or like this (depending on which version of PHP you want to use): export PATH=/Applications/MAMP/bin/php/php5.3.6/bin/:$PATH

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)