Hello everyone, in this article we will learn how to Install Microsoft SQL Server 2019 on Linux Mint 20. Recently, Microsoft releases the Linux version of its popular RDBMS database, SQL Server. It is a piece of good news for Linux users since they can now deploy MS SQL Server on top of the Linux system.
Steps to Install Microsoft SQLServer on Linux Mint 20
Step 1. Update System
It is good to update the system prior to the installation
sudo apt update && sudo apt upgrade
You may need to reboot your Linux Mint 20 afterward
Step 2. Configure the Repository
Next copy and paste this line to add the GPG keys
sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc
| sudo apt-key add -
Step 3. Add the MS SQL Server Repository
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"
Now update and install SQL Server
sudo apt update
sudo apt install mssql-server
Step 4. Configure Microsoft SQL Server
Now, run this command to start configuring the server
sudo /opt/mssql/bin/mssql-conf setup
Select the SQL Server edition
In this case, I choose the Developer edition. Next, enter your sa password
In a few moments, the server is ready
The Microsoft SQL Server installation is complete. Now, let’s check the service status.
sudo systemctl status mssql-server
Install SQL Command Line Tools on Linux Mint 20
Additionally, we can install the SQL command-line tool to connect and manage the SQL Server via command line.
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add – curl https://packages.microsoft.com/config/ubuntu/19.10/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list sudo apt update sudo apt install mssql-tools
Next, we need to add this tool to PATH environment
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
Done. Now, let’s try to connect to the server and create a new database
sqlcmd -S localhost -U SA -P 'YourSQLServerPassword'
If successful, you will see 1> on your Terminal. Now let’s create a new database called MINT.
Thanks for reading this article How to install Microsoft SQL Server 2019 on Linux Mint 20. I hope you enjoy it and see you on the next tutorials. Cheers.