Installing Microsoft SQL Server on Ubuntu

You may not know this, but Microsoft is quite supportive of the open-source community. Proof of this is that some Microsoft software is available on Linux, including .NET and SQL. Below, TipsMake will guide you on how to install Microsoft SQL Server on Ubuntu.

If your purpose is testing, you can refer to the article on how to install Ubuntu in VMware and then follow the steps below from TipsMake to install Microsoft SQL Server on Ubuntu to ensure you don't encounter any serious problems during the process.

Request

- The device you want to install SQL on must have at least 4GB of RAM.
- Your computer must be running Ubuntu 16.04 or 16.10.

Install SQL

Make sure your Ubuntu computer is updated:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

Then add the SQL repository:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Register a Microsoft Ubuntu repo:

curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list

Update the repository:

sudo apt-get update

Install SQL:

sudo apt-get update

The above command will begin installing SQL:

Run the following setup command to complete the Microsoft SQL Server installation process on Ubuntu:

sudo /opt/mssql/bin/mssql-conf setup

Then press Y to accept the terms of the agreement.

Next, enter your SA account password.

The above steps will complete the installation process.

Open port 1433 on Ubuntu Firewall:

sudo ufw allow 1433

Connect to the server using the command-line utility.

To connect to the server using the command-line utility, you must have the mssql-tools package. To install the mssql-tools package on Ubuntu, run the following command in the Terminal window:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Register a repository with Microsoft:

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list

Update the source and install the package using the command:

sudo apt-get update && sudo apt-get install mssql-tools unixodbc-dev

Add mssql-tools to the bash path:

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> -/.bash_profile

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> -/.bashrc source -/.bashrc

To connect to the database, you use the command:

sqlcmd -S localhost ( or the IP address of the server ) -U SA

And you will be prompted to enter your SA account password.

To create the database, enter the command:

CREATE DATABASE testdb;

GO

To view the database on the server, enter the command:

SELECT Name from sys.Databases;

GO

To end a session, simply type QUIT . The syntax is quite similar to MySQL.

Connect to the server using Microsoft Management Studio

To manage servers on a Windows 10 computer, you can use Microsoft Management Studio.

Download and install Microsoft Management Studio here: Download Microsoft Management Studio

The installation process can be fast or slow depending on your computer's configuration.

After the installation process is complete, find and open Microsoft SQL Server Management Studio. Enter the IP address in the Ubuntu name field , select SQL Server Authentication from the Authentication menu . Enter your SA account username and password there.

You have now successfully connected to the server.


Above, TipsMake has guided you on how to install Microsoft SQL Server on Ubuntu. While you can only install Microsoft SQL Server on Ubuntu, you can install other software with just a few simple steps. You can also refer to how to install Java on Ubuntu for more detailed instructions. Any questions or comments are welcome in the comments section below the article.

Other SQL articles
  • The LIKE and IN comparison operators in SQL

    các bài viết trước đây tipsmake đã giới thiệu cho bạn về các lệnh, mệnh đề phổ biến trong sql. bài viết hôm nay tipsmake sẽ giới thiệu tiếp cho bạn các toán tử so sánh like, in trong sql
  • The CREATE command in SQL

    sql là viết tắt của structured query language, là ngôn ngữ lập trình được sử dụng để liên lạc và vận dụng cơ sở dữ liệu, trong bài viết dưới đây tipsmake sẽ giới thiệu lệnh create trong sql giúp bạn nắm rõ cú pháp cũng như cách sử dụng.
  • GRANT, REVOKE in SQL

    các lệnh dcl trong sql được sử dụng để thực thi bảo mật cơ sở dữ liệu trong môi trường cơ sở dữ liệu người dùng. lệnh grant, revoke trong sql là 2 kiểu lệnh dcl. Để tìm hiểu rõ hơn về lệnh dcl cũng như lệnh grant, revoke trong sql, bạn đọc cùng tham khảo bài viết dưới đây của tipsmake.
  • The JOINS command in SQL

    thông thường, lệnh joins trong sql được sử dụng để kết nối các thông tin trong các bảng khác nhau, điều kiện joins là một phần trong truy vấn sql để truy xuất các hàng từ 2 bảng trở lên.
  • How to deploy SQL Server via PowerShell DSC

    hôm nay, tipsmake sẽ hướng dẫn các bạn cách triển khai sql server thông qua powershell dsc giúp bạn có thể sử dụng tính năng powershell mới quan lý cơ sở hạ tầng trong cơ sở, trên dịch vụ đám mây hiệu quả, dễ dàng.
  • How to create, validate, and modify the Identity column in Microsoft SQL Server

    microsoft sql server được tích hợp sẵn cột identity, được sử dụng để tạo ra các giá trị quan trọng. nó có thể tham chiếu nhưng một trường autonumber trong microsoft access hoặc một dãy trong oracle. bài viết dưới đây tipsmake sẽ hướng dẫn bạn cách tạo, kiểm tra và thay đổi cột indentity trên microsoft sql server.
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup