Extracting the certificate and keys from a .pfx file

Start OpenSSL from the OpenSSL\bin folder.
Open the command prompt and go to the folder that contains your .pfx file.
Run the following command to extract the private key:
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [drlive.key]Copy
You will be prompted to type the import password. Type the password that you used to protect your keypair when you created the .pfx file. You will be prompted again to provide a new password to protect the .key file that you are creating. Store the password to your key file in a secure place to avoid misuse.
...

Increase Open File Limit Tomcat CentOS 7

  1. check PID
systemctl status tomcat

  1. Check max open file
cat /proc/<PID>/limits
  1. create config file
mkdir -p /etc/systemd/system/tomcat.service.d/
vim /etc/systemd/system/tomcat.service.d/limits.conf
[Service]
LimitNOFILE=8192
  1. reload and restart service
systemctl daemon-reload
systemctl restart tomcat

MySQL output query to file

Use the command line switch option -e to input the query and > to redirect the output to a file:

mysql -uuser -ppass -e "SELECT id, name FROM person WHERE name like '%smith%'" database > smiths.txt

Use the SQL query construct INTO OUTFILE 'filename' to write the results to file from inside the MySQL command line interface:

mysql -uuser -ppass database
mysql> SELECT id, name INTO OUTFILE '/tmp/smiths.txt' FROM person WHERE name like '%smith%';
Query OK, 10 rows affected (0.01 sec)

Be sure where you have write permissions w...

How To Reset MariaDB 10.1 Root Password on Ubuntu 18.04

Forgetting passwords happens to the best of us. If you forget or lose the root password to your MySQL or MariaDB database, you can still gain access and reset the password if you have access to the server and a user account with sudo privileges.

_Note: On fresh Ubuntu 18.04 installations, the default MySQL or MariaDB configuration usually allows you to access the database (with full administrative privileges) without providing a password as long as you make the connection from the system's root account. In this scenario it may not be necess...