http://www.sampleprogramz.com/android/

Web

➜  ~ sudo apachectl start
Password:
➜  ~ /usr/sbin/httpd -v
Server version: Apache/2.4.23 (Unix)
Server built:   Aug  8 2016 16:31:34

➜  ~ cd /Library/WebServer/Documents

MySql

http://dev.mysql.com/downloads/mysql/

Begin Your Download - mysql-5.7.16-osx10.11-x86_64.dmg 2016-10-19T03:13:16.829768Z 1 [Note] A temporary password is generated for root@localhost: 5g5W26f)iiPF

If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.

➜  ~ vi ~/.bashrc
➜  ~ vi .zshrc

#mysql
alias mysql='/usr/local/mysql/bin/mysql'
alias mysqladmin='/usr/local/mysql/bin/mysqladmin'

#password
➜  ~ mysqladmin -u root -p password root
Enter password:
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.

REBOOT

else error:

➜  ~ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

➜  ~ sudo vi /etc/apache2/httpd.conf
Password:

\#LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module libexec/apache2/libphp5.so

➜  ~ sudo cp /etc/php.ini.default /etc/php.ini
➜  ~ sudo vi /etc/php.ini

\# mysql.default_socket =
mysql.default_socket = /tmp/mysql.sock

sql

➜  ~ mysql -uroot -p
Enter password:
mysql> create database android;
Query OK, 1 row affected (0.02 sec)
mysql> use android
Database changed
mysql> create table sample (id int primary key, name varchar(25));
Query OK, 0 rows affected (0.12 sec)

mysql> select * from sample;
+----+---------------+
| id | name          |
+----+---------------+
|  5 | AndroidDevLog |
|  6 | iOSDevLog     |
+----+---------------+
5 rows in set (0.00 sec)

Android Studio

CMD+;

Modules -> Dependencies -> + -> 1. Library Dependency

1

2

org.apache.http.client