Connecting to a Remote MySQL Server Securely
There are times when you need to connect to your MySQL or MariaDB remotely but don’t want to enable remote connections on the server. The solution is to use SSH tunneling with OpenSSH. SSH tunneling works by forwarding requests from a client port to the SSH server. The SSH server will then forward the request to the destination which can be itself or any other host the SSH server can access.
Improving Website Pagination Speed with MySQL
Nearly every website implements some sort of pagination of data. Pagination is the process of splitting large sets of information into multiple pages (i.e. search results, emails, etc). In most cases for pagination to work, the total number of items for the dataset must be calculated to know total number of pages. This is commonly done by performing two SQL queries, one to receive the data for the current page and another to count the total number of rows to later calculate the total number of pages.
Protecting your OpenSSH Server
SSH is the most valuable tool to manage your servers. As you already know, SSH allows you to remotely connect to your server and access a shell. With the power SSH possess, it’s important to protect SSH to ensure the only trusted people are able to connect. This post will go through the SSH configuration settings that need to be modified to help protect your server.
Editing SSHD Configuration Files
To prevent this tutorial from repeating itself too frequently, here is an overview of how to edit the /etc/ssh/sshd_config
file. OpenSSH’s server configuration file is located at /etc/ssh/sshd_config
, which is different from the client configuration file /etc/ssh/ssh_config
. It’s possible that SSHD is using a different configuration file if the command line argument -f
is being used.
Google Drive Create Envelope Template
Creating an envelope is most office suites only requires you to dive one or two levels into a menu. As for Google Drive, this just isn’t the case. It’s possible to change a Google Drive document’s page setup by navigating to “File - Page Setup”, but there are only eleven predefined paper formats you can choose from. To change the actual dimensions of the Google Drive document, you need to use a Google Apps Script that changes the documents dimensions. If you don’t want to build a script (and I don’t blame you), below is a list of documents with the most common envelope dimensions.
How to Separately Handle Multiple Website Deployments
Uploading website files routinely can become a chore, and no one wants that. Queue a deployment script, at the very least, it’s a script that uploads files to the server, but can be as advanced as verifying files once uploaded, run code tests, and update database structures along. There are two different methods to run a deployment script. First being automated deployment with continuous integration systems to a staging or production servers. The second method is to manually run the deployment script when you’re ready to upload changes onto the servers. It’s not uncommon to see both methods used, with automated deployment to a staging server and manual deployment to the production server.