# - - # # - Access MySQL from Mac - # cd /usr/local/mysql/bin ./mysql -u is_derayo -p -h isdevelopment.us # - - # # - If you don't remember the password you set for root and need to reset it, follow these steps: - # 1. Stop the mysqld server, this varies per install sudo /usr/local/mysql/support-files/mysql.server stop; 2. Run the server in safe mode with privilege bypass sudo mysqld_safe --skip-grant-tables; sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables; # - For Mac - # cd /usr/local/mysql/bin/ sudo ./mysqld_safe --skip-grant-tables; sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables; 3. In a new window connect to the database, set a new password and flush the permissions & quit: mysql -u root; # - For Mac - # ./mysql -u root; /usr/local/mysql/support-files/mysql For MySQL older than MySQL 5.7 use: USE mysql; UPDATE mysql.user SET Password=PASSWORD('your-password') WHERE User='root'; For MySQL 5.7+ use: ( iMac - My case ) USE mysql; UPDATE mysql.user SET authentication_string=PASSWORD("Administrator2") WHERE User='root'; 4. Refresh and quit: FLUSH PRIVILEGES; \q 5. Restart MySQL server sudo /usr/local/mysql/support-files/mysql.server start 6. Access MySQL with root user ./mysql -u root -p 7. Alter root user ALTER USER 'root'@'localhost' IDENTIFIED BY 'Administrator2'; 8. Grant all privileges to special users GRANT ALL PRIVILEGES ON *.* TO 'is_derayo'@'localhost' IDENTIFIED BY 'Administrator2' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'is_derayo'@'%' IDENTIFIED BY 'Administrator2' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Administrator2' WITH GRANT OPTION; Done. # - - # # - This worked on the job - # If you are using a firewall then you need to remember to open the port 3306 in your firewall to allow remote MySQL requests to reach MySQL server. http://dev.mysql.com/doc/refman/5.7/en/connecting.html http://dev.mysql.com/doc/refman/5.7/en/secure-connection-options.html # - - # # - This worked in the house - # Also, you would need to configure your firewall to let this traffic pass though, and also possibly the MySQL server to allow connections from external IPs. mysql -u is_derayo -pAdministrator2 -h 72.76.190.188 mysql -u is_derayo -pAdministrator2 -h isdevelopment.us mysql -h isdevelopment.us -P 3306 -u is_derayo -pAdministrator2 # - - # # - How to connect to MySQL using PHP - # https://www.a2hosting.com/kb/developer-corner/mysql/connect-to-mysql-using-php http://www.cyberciti.biz/faq/how-to-connect-to-my-mysql-database-server-using-command-line-and-php/ https://www.digitalocean.com/community/tutorials/how-to-set-up-a-remote-database-to-optimize-site-performance-with-mysql http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/ http://php.net/manual/en/function.mysql-connect.php # - - # # - Accessing my web server from the internet - # # - - # http://stackoverflow.com/questions/9454503/apache-how-can-i-access-my-webpage-from-a-computer-outside-my-network # - 1 - # Short answer: The solution to this would be to find out the 'external IP' of your router and enable a port forwarding for port 80 and 443 to your local IP. Long answer: The Internet is divided into 'public' and 'private' IP spaces. Private IPs are usually not directly accessible from a 'public' IP. The IPs from the 192.168.0.1-255 are from one of these private subnets. Your router (at home) usually has multiple IPs. One or more from your local private network (192.168.0.X) and one from your local ISP (I guess something like 193.xxx.xxx.xxx because your DNS is in that network) which is from the 'public' space. To connect to your computer with the private IP from a public IP like the mentioned 254.231.52.xxx you would have to connect to the public IP of your router (the 193... one). You would also have to enable a mechanism that is called 'port forwarding'. This effectivley takes all internet traffic arriving at the public IP of your router on the forwarded ports and transfers it to the private IP you configured the forwarding to. E.g. 254.231.52.. -> 193...:80 -> 192.168...:80 Usually home routers have a configuration page where you can do this. The required ports you would probably use are 80 (http) and 443 (https). Another possibility is using so called http-proxies which are also usually supported as a configuration option one home routers. You should refer to the manual of your router for configuration instructions of this. # - - # # - 2 - # # - Very good - # https://managewp.com/how-to-access-a-local-website-from-internet-with-port-forwarding