How Do You Install PostgreSQL on a Debian/Ubuntu Linux Server?

Problem scenario
You are using Debian or Ubuntu Linux and you want to install PostgreSQL. What do you do?

Solution
Run these commands:
sudo apt -y install postgresql
sudo systemctl start postgresql@11-main
sudo pg_ctlcluster 11 main start

 » Read more..

How Do You Enter the PostgreSQL Command Line from the Linux Command Prompt?

Problem scenario
You are using Debian or Ubuntu Linux and you want to enter the PostgreSQL command prompt. What do you do?

Solution
Run these commands:

sudo su postgres
psql

You are done. Optionally you can run these passwords if you want:
postgres=# create user jdoe with password ‘goodpassword’;
postgres=# create database foobar with OWNER=jdoe;

 » Read more..

How Do You Enter the MySQL Command Line from the Linux Command Prompt?

Problem scenario
You are using Debian or Ubuntu Linux and you want to enter the MySQL command prompt. What do you do?

Solution
Run this command: sudo mysql -u root

 » Read more..

How Do You Install MySQL on a Debian/Ubuntu Linux Server?

Problem scenario
You are using Debian or Ubuntu Linux and you want to install MySQL. What do you do?

Solution
sudo apt -y update
sudo apt -y install default-mysql-server mycli
sudo systemctl start mysql

 » Read more..

How Do You Troubleshoot the Presto Error “‘PK\003\004’: command not found”?

Problem scenario
You try to start Presto from a command line interface. But you get an error message with garbled output like this:

./presto: line 1: $’PK\003\004′: command not found
./presto: line 2: $’ܢ\327H’: command not found
./presto: line 3: syntax error near unexpected token `)’
./presto: line 3: ۢ▒H▒▒W▒META-INF/MANIFEST.MF▒P▒j!▒▒▒?▒8▒▒ɸK)’

Possible solution #1
You may have downloaded a .jar file that could be unpacked.

 » Read more..

Where Can You Obtain a Python 3 Version of launcher.py in Presto?

Problem scenario
You try to start an older version of Presto. It keeps failing with a variety of errors. You are using Python 3. Where can you find a launcher.py file that uses Python 3 for Apache Presto?

Solution
Go to this GitHub link.

 » Read more..

What Does RDS Mean in the Context of Databases?

Question
You have seen the initialism RDS. What does this term mean?

Answer
Normally it is a reference to AWS’ PaaS offering for relational databases called Amazon Relational Database Service.

The term RDS can refer to Reference Data Services in the Microsoft realm (e.g., Azure or SQL Server). Here is more information.

 » Read more..

How Do You Get SonarQube to Use a New Database Connection and Change It from the Previous One It Was Working with?

Problem scenario
You try to start an old SonarQube instance but with a new database connection. In the web.log file you see a message like this: “Can not connect to database. Please check connectivity and settings.” What should you do?

Solution
Go to sonar.properties. Find the connection string for the new database. It should look something like this:

sonar.jdbc.url=jdbc:oracle://FQDN:1521:XE

The default port for Oracle databases is 1521.

 » Read more..

How Do You Delete an Aurora Database when You Get an Error about It Not Being Started?

Problem scenario
You are trying to delete an Aurora database but you get this error: “This database is not started.” What do you do?

Possible Solution #1 (with the web console)
1. Log into the web console.
2. Go to “Amazon RDS”.
3. Go to “Databases”
4. Click on the Aurora cluster of the database you want to delete or its parent.

 » Read more..

What Are Some Free SQL Front-end Applications to Install on a Windows Desktop?

Problem scenario
You want a free trial or a completely open source (always free) graphical user interface application to install on your Windows desktop or laptop. What options do you have for a free front-end?

Answer
These GUIs are free or free to start out with an initial trial:

https://www.aquafold.com/aquadatastudio/trialregform
https://www.heidisql.com/
https://dbeaver.io/
https://www.devart.com/dbforge/postgresql/studio/
https://www.pgadmin.org/
https://omnidb.org/en/
https://teamsql.io/
https://download.cnet.com/DbVisualizer/3000-10254_4-10202406.html
https://fishcodelib.com/database.htm

 » Read more..