Where is the link to phpmyadmin in Google Compute Engine? - mysql

I set up a LAMP instance in Google Compute Engine approx 45 days ago, and it came with phpMyAdmin already set up and accessible via a button in the console (in Compute Engine -> VM instances -> instance-name -> phpMyAdmin).
The button is now gone, and I can't find any documentation regarding the change. I can still access it via the browser at my-ip/phpmyadmin.
Just wondering if there was some recent change I was unaware of. I can update phpmyadmin manually but it appears that GCE no longer "officially" supports it.

I am assuming you deployed your LAMP stack via deployment manager. https://console.cloud.google.com/deployments/
If so, you should be able to access your deployment and all the relative details over there including login link for phpmyadmin.
As far as support from Google is concerned, since you have already deployed your instance, even if they remove it from their deployments, it will never affect what you have deployed. Moreover I just deployed a new instance and I can see that phpmyadmin is as an option (not sure if it always was). But even after adding it to my deployment, no extra instance for phpmyadmin was created. It is in the same instance as my rest of stack.
Since you are able to access it via your URL, there's nothing be worried about, and there are no changes on GCP side either. If anything, phpmyadmin is now optional.

Related

How do you change the public key of a Oracle Cloud Instance?

I accidentally deleted my public and private key and had to generate new SSH keys due to not being able to restore the keys (and not having a backup anywhere). How do I change the public SSH key then of my Oracle Cloud instance?
Terminating the instance and remaking it isn't an option, and I've tried looking online but wasn't able to find much. Any help would be appreciated.
Thanks
Some background
Found a solution! Just so people are aware, there are methods online that involve connecting to the machine via VNC, but for me personally it felt very trial-an-error, when pressing buttons at the wrong time, and it ended up not working properly (VNC didn't display recovery mode for me, just a blank screen after selecting it).
Summary
This guide involves: Creating another machine (as incl. in free tier anyway), detaching the boot volume drive from the machine and attaching it to the machine just created, to do editing to change the keys over, then attaching the drive back up.
Create another VPS (Oracle have them incl. > free tier)
I deleted one of my other VPS' in the Oracle panel (that was a free machine - as I didn't need it and wasn't using it) and created it again anew (I made sure to delete the old boot volumes before continuing).
(This solution is assuming your using Ubuntu 20.04, but this will probably work for other OS's as well)
Basically from there,
I powered off the machine I wanted to change my SSH key of.
After fully being powered off, just detach the boot volume from the VPS, and attached it as a block volume to the machine just created.
Login to the machine via SSH, and run the connection commands by hitting the three dots (image below) and viewing the connection commands, to connect the drive up.
Editing files on the drive & mounting process
Then by running blkid (or sudo fdisk -l for a more friendly view)
you're able to see what drives are available for mounting. So then you just make a folder and simply type:
sudo mount [drive path e.g. /dev/sdb] [folder path e.g. ./drive]
Edit the file at /home/ubuntu/.ssh/authorized_keys, or however your machine is configured (Oracle by default disallows root, but if you've edited your configuration it's up to your end).
Then, simply go to the relevant path to be able to unmount the drive, umount [folder path e.g. ./drive]
Run the disconnect commands for the drive from the panel.
Then, simply detach the drive from your other machine and reattach it back to the original machine. Wait till it's fully attached and then start the machine again.
You can create a console connection, connection to it, then reboot the instance (through OCI console), and get to GRUB in the console connection... a few more steps and you can upload a new ssh key: https://docs.oracle.com/en-us/iaas/Content/Compute/References/serialconsole.htm

Legacy GCE and GKE metadata requests from google_daemon/manage_addresses.py

I have an old Debian Compute Engine instance (created and running since December 2013) and got an email warning about the turndown of Legacy GCE and GKE metadata server endpoints (more details at https://cloud.google.com/compute/docs/migrating-to-v1-metadata-server).
I followed the directions for locating the process and found that the requests were coming from /usr/share/google/google_daemon/manage_addresses.py. The script seems to be the same as what's at https://github.com/gtt116/gce/blob/master/google_daemon/manage_addresses.py (also with what's in that directory).
I don't recall installing this, so I'm imaging it came with the provided Debian image I used in 2013.
Does anyone know what this manage_addresses.py script is, what it does, and what I should do with it now that the legacy metadata server endpoints are turning down? Is it safe to just stop running it? Or is there a new script I should replace it with? Or should I just try to update it myself to use the new endpoint?
I dug around and was able to trace /usr/share/google/google_daemon/manage_addresses.py as being installed by a package called google-compute-daemon. A search for that brought me to https://github.com/GoogleCloudPlatform/compute-image-packages#troubleshooting which explains that google-compute-daemon has been replaced with python-google-compute-engine. That led me to https://cloud.google.com/compute/docs/images/install-guest-environment . I followed the instructions there and manually installed the guest environment.
I noticed during installation that it said it was removing the google-compute-daemon package (and a packaged called google-startup-scripts), so this seems like the right thing. And I'm no longer seeing any requests to the legacy endpoints. So it seems like at some point the old guest environment failed to update.
TLDR; If you have this problem, follow the instructions at https://cloud.google.com/compute/docs/images/install-guest-environment#installing_guest_environment to manually update the guest environment.

Intermittent MySQL Connection Error in Azure Website

I'm getting the following error intermittently when making a call from my ASP.Net MVC web application which is using Dapper to query MySQL.
Unable to connect to any of the specified MySQL hosts.
The exception only occurs when my web app is published to Azure. It has worked 100% of the time when I run the code locally. I've deployed the code to a second azure website, and also get the exception there, again intermittently.
The MySQL database is running on an Azure VM (Ubuntu). This server also has some R scripts that access the database, which are being run at a set interval. I've had no connectivity issue with these either. It is just the .Net code that's struggling.
I've scoured the web, but don't feel like I've turned up anything of value. Most of the links have pointed to a connection string problem, but since it works intermittently that doesn't seem to fit my problem. Some links have referenced DNS issues, but I'm getting the same problem when I use the IP Address instead of the machine name for the DNS server.
I'm sure I need to track down more information, but I'm not sure where it would be. This is my first foray into using a MySQL db in this fashion, and I'm not familiar with config options or log files on that side of things. I feel similarly about Azure websites with database interactions too.
What can I try next?
Just to drive home the point about this error being intermittent, here's a screenshot from the Runscope job that's hitting the page (thus triggering the MySQL query) every 5 minutes:
I was able to fix (or perhaps "circumvent") this problem by adding the --skip-host-cache flag to our mysql configuration file. I still don't fully understand what the root of the problem is, but we haven't had any issues with MySQL connectivity from the Azure website since adding that.

Editing a Google Apps Engine file via SSH

I'm dealing with a deprecated Google Apps Engine project where I want to make a small change to an HTML file. Since I don't have the dev environment set up, I've edited the file by SSHing into the server and using sudo nano [file].I'm aware that this is probably bad practice, but this is a one-time issue that needs to be fixed quickly.
My changes don't seem to be propagating to the live webapp. Is there some additional step to complete changes to files on the App Engine Compute Engine VM instance to get them to go live? (maybe it is a CDN or cache issue?)
As some context, I know almost nothing about this environment. Thanks!

SQL Component Connection issue in IDE

Good evening guys.
I'm currently trying to get started on development of a project to make my own life a little easier. Essentially, i want to connect to a MySQL database running on a remote server, and then go from there with a few various options for usage. The database in question is used for a Joomla! installation, and my focus will primarily be managing articles from a desktop application (as opposed to using the administrator backend on the website).
I've allowed my own host access to the remote servers (via the CPanel web interface used by my hosting provider), and ensured that LIBMYSQL.dll is inside the RAD Studio\9.0\bin folder and again inside my executables folder (so as to avoid any of the issues related to being unable to init. the driver). I've connected to the server successfully by using MySQL Workbench and can freely query the table. Now, onto the problem.
This is my first database application so please understand that a simplified or excessive explanation may be needed
I'm having issues setting some of the component properties at design time. I've got a TSQLConnection component, a TSQLDataSet component, and a TSQLTable component. I've set up the server properties in TSQLConnection to work with my server.
However, if i try to retrieve anything from the database inside the Delphi XE2 IDE (i.e. the login prompt appears) such as changing Active property to true, i get a Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (10061) error (where 'x' relates to part of my servers IP).
If i run the application itself though, and then click on the "connect" button i've got on the interface, it connects fine with no errors. I added ShowMessage routines to the AfterConnect, AfterDisconnect, and OnLogin events of TSQLConnection to verify it was actually going through, and all of them functioned as i'd expect when successful. As i've not coded for it to do anything outside of that (due to still learning the basics), there's no data visible on the interface for me to work with, but the connection at least appears to be there.
To clarify, i can connect from the application i developed (as well as from MySQL Workbench, but not from within the Delphi IDE itself.
So, where am i going wrong with this?
I'm guessing it's probably some oversight by myself due to my lack of knowledge on the subject of databases, but i'm very keen to expand out of the desktop environment and start working with some more areas of the IT world (without losing the development side of things that i enjoy so much).
As #SertacAkyuz pointed out in the original comments, it was indeed an issue related to my connection, specifically Firewall settings. I had assumed that "Connection Refused" was related to the connection attempt being made, but being actively refused by the remote server. The more you know.