How to Access phpMyAdmin on Google Cloud Compute on your Mac

I’ve been doing a small bit of Google Cloud Compute(GCP) configurations to run this blog. I thought I’ll start sharing some of the steps I’ve gone through which could be useful to others out there. So I’ve setup a GCP instance and configured it with a WordPress Bitnami stack. I’ve got some videos of those in this playlist if you want to follow along.

But on this post I would be discussing about accessing phpMyAdmin on GCP via an SSH Tunnel on your Mac.

In order to access phpMyadmin on a WordPress Bitnami stack from Google Cloud Compute you need to do this using an SSH tunnel. On the WordPress Bitnami stack, phpMyAdmin is blocked from the public and only accessible from the localhost. This is where SSH tunnel comes in. Basically you access the localhost on a particular port on your computer that forwards that information to the remote server on an encrypted channel and then the remote server sends the content back to the local computer.

Here is an illustration on how that access is provided via the SSH tunnel.

Another example of using SSH tunnel is when a website is blocked from your company firewall or proxy filter, you can use SSH tunnel to bypass the proxy and connect to a remote computer that has no restriction and can access the blocked website.

With that said, lets connect via SSH tunnel on your Mac.

  1. Open the terminal and change directory to where your private key is located
  2. Type in following, replace the private key name, user and IP to match yours. Enter passphrase when prompted.
    • ssh -N -L 8888:127.0.0.1:80 -i <keyfile> <username>@<ip>
  3. If successful it would not prompt any errors. If you want to login to the instance you can strip out the -N parameter.
    • ssh  -L 8888:127.0.0.1:80 -i <keyfile> <username>@<ip>
  4. Open your brower and enter 127.0.0.1:8888/phpMyAdmin
  5. You should be able to view phpMyAdmin

 

Here is a video I made for the process.

 

That should be it. If you have questions or comments please use the section below and feel free to subscribe to my youtube channel.

Hidden Gems on the Spring 18 Salesforce Release For Developers

Salesforce Spring 18 comes with some pretty nifty updates for developers. Been playing around with some of the new stuffs and will come up with some videos for each as I get in depth with them more.

 

  • Flow Enhancements
    • Ability to add Lightning Components to Flow –  lightning:availableForFlowScreens
    • We can already make Lightning Component as a Quick Action, now you can do that with Flow too
  • New Base Lightning Components
    • This  new base components works together and allows you to build forms faster. It determines the field type, field level security and displays the field styled(LDS) accordingly. Similar to using force:inputInputField but with less controller and apex work.
      • lightning:recordEditForm
      • lightning:inputField
    • New base components – carousel, formattedAddress, formattedName, formattedTime, inputAddress, inputField, listView, pillContainer, treeGrid, and prechatAPI.
  • Salesforce DX
    • Two types of second generation packing
      • ISV type managed packaging
      • Developer controlled packaging – unmanaged packaging but upgradeable. Wuhoo!
  • Component Library
    • View documentation on the base and your custom built lightning components
      • simply add /componentReference/suite.app to the base URL
  • Einstein Vision
    • This soo cool, you can train deep-learning models to detect images and count distinct objects within an image with Einstein Object Detection.
  • UI API
    • Recreate the Salesforce page layout on any web app or mobile app. You can can pretty much do CRUD operations with the API.
  • Some other stuffs worth mentioning
    • Cloning sandbox now in beta
    • Debugging – public site users no longer need a browser cookie to activate debug logging. FTW.
    • Custom metadata in validation rules in pilot

What are your favourite features?

Stay tuned!

Get Creative. Ignore Everbody

Just finished reading this great book by Hugh MacLeod. One of the books recommended by the author of Steal like an Artist. It’s fun and easy to read book. I particularly like the splash of comic strips to each chapter. This book is full of tips to inspire you to get creative, do the stuffs you love doing and not getting bogged down with the money aspects. It is more on finding what makes you tick to be creative and owning that work. Eventually something good would happen.

Check out the blog at https://www.gapingvoid.com/blog/

Get a copy of the book here

Tips and Takeaways from Taking the Lightning Experience Rollout Specialist Superbadge

Been procrastinating and holding off getting this Superbadge for some time as it seems to be too much material to cover. With some deadlines imposed by Salesforce for partners to get accredited for Lightning, I eventually got into it. So I sat this one and got my first superbadge.

There are a total of 8 challenges and 2 quizzes to check your knowledge. Took me around 8-10 hours to finish in a span of three days as I did them after work.

Takeaways from the challenge

  1. First is setting up and installing the managed package on a Trailhead playground requires some fiddling around. Login to trailhead on incognito and create a new playground, get the password for the user and it asks you for a security question just enter “Blank”. After this, you can install the package on that playground.
  2. The lightning migration tool does most of the analysis for you. Go over the readiness reports and relate them to the requirements to come up with a solution.
  3. Check challenge button shows tips on what’s wrong based on your progress on the challenge and sometimes shows more details of the requirement. I find myself checking challenge here and there but if you get stuck then google is your friend and check the developer forums.
  4. If you are not comfortable with a particular challenge, say styling the VF page, read up more or check the associated trailhead badge. I’m pretty sure most admins will get stuck on this one.
  5. You need to switch around classic and lightning to get some configuration or setup done. I got stuck on the Report challenge as the Add Chart button was not showing on Lightning, works well on Classic.

If you need help completing the challenge hit the comments below and I’ll be glad to help. Good luck on getting that superbadge.

Fixing Apache after upgrading to MacOS High Sierra

If your previous Apache setup stopped working after updating to MacOS High Sierra, then this post should be useful for you. On every update of the MacOS it ships with its own version of Apache and PHP and creates a new install that overrides your configuration.

Read the rest of this entry »