Note to self: Google Colaboratory.
Write, run and share code. No setup at all on your own computer.
Note to self: Google Colaboratory.
Write, run and share code. No setup at all on your own computer.
Pretty much every web hosting company allows you to create MySQL databases. It’s reasonably simple with cPanel and the MySQL Database Wizard. Then you can create tables and field names, etc., with phpMyAdmin.
So what if you’re developing a small database application on your laptop, and you don’t want to mess around with XAMPP or MAMP? No problem! Handy cPanel also gives us Remote MySQL so you can allow remote access to your databases from your laptop. Find it under Databases in cPanel.
To find the IP address your laptop is using right now, go to ip4.me. Copy and paste it into the box labeled “Host” and then click “Add Host.”
NOTE 1: At home, at school, and in a coffee shop, your IP address will be different. Therefore you will need to enter a new IP address into Remote MySQL at each location where you work on your app locally.
NOTE 2: Use the separate cPanel tool MySQL Databases for managing database users.
NOTE 3: Alternatives to phpMyAdmin that run on your computer include Sequel Pro (Mac) and HeidiSQL (Windows).
Here are detailed instructions for an assignment for which my students create a new database via cPanel.
For whatever reason, I’ve been slow to embrace Heroku. Its charms are growing on me, though. For a project I made for an online course, creating a PostgreSQL database at Heroku was required. These are the instructions, and they worked perfectly.
* This app name will appear in the URL if later you deploy an online app using this database. So do not name it something generic like “database1.” If your app is about cities in Europe, for example, name it europe-cities. A hyphen is fine. Do not use spaces or other marks of punctuation.
Now, how will you use that database? That will be the topic of a future post. Stay tuned.
I’ve been testing pages and files on various sites of mine to make sure they always use HTTPS (not insecure HTTP).
WordPress sites turn out to have an annoying tendency to ignore the root’s .htaccess file in which you have added code to supposedly force all files and pages to use HTTPS.
The solution is nicely detailed here. The first part — where he edits Settings in WordPress — was already in place for me. The key turned out to be adding two lines to the .htaccess file inside my WordPress directory. He’s got that under the subheading Fix .htaccess to process website assets such as CSS and JavaScript under HTTPS.
If you don’t fix that, a URL to a WordPress post or page pasted into the browser address bar will open insecurely.
NOTE: Do not ignore what he says about your WordPress cache. I had to manually change an http: to https: in the settings for the WP Super Cache CDN. Before I did so, my blog was wrecked and unreadable!