The Java deployment world is plagued with infra issues! Things we need to take care of:
- Shell accesses
- File System Storage
- Indexes corrupting and the list goes on…
So after my failed attempt to understand/decipher CORS issues on the AWS platform, I fortunately stumbled on google-cloud! And it is one hell of a bouquet of services for us petty and dev-ops-complaining Java folks!
So churn out a bitnami tomcat instance and you get the feel of the aws thing. For over a month now my google cloud app was(still is) talking to the mysql instance on aws, before that starts to drain my mini wallet, time to configure a mysql instance on google-cloud. And here are the steps:
- Have access to the SSH into your google cloud instance working
- Create following script (/home/bitnami/mysql-init):
UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') WHERE User='root'; FLUSH PRIVILEGES;
sudo /opt/bitnami/ctlscript.sh stop mysql
sudo /opt/bitnami/mysql/bin/mysqld_safe --defaults-file=/opt/bitnami/mysql/my.cnf --pid-file=/opt/bitnami/mysql/data/mysqld.pid --init-file=/home/bitnami/mysql-init 2> /dev/null &
sudo /opt/bitnami/ctlscript.sh restart mysql
- Remove the script in step 2.
So it turns out to get mysql talking on your bitnami instance you only need to reset the password.
Further to enable remote access do this in
Next to enable remote mysql access via workbench you need to enable firewall ports to allow connections for tcp 3306 for a specific ip on your google cloud instance.
And there you go, you have a lot powerful config, much like aws ready to be used, backed by google!!