✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
YouTube Setup Microsoft SQL Server on Ubuntu 20.04
🔗 https://youtu.be/x6pYoWwtVAY
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
SUPPORT MY WORK - Everything Helps Thanks
YouTube 🔗 https://YouTube.GetMeTheGeek.com
Buy Me a Coffee ☕ https://www.buymeacoffee.com/getmethegeek
Hire US 🔗 https://getmethegeek.com
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
sudo apt update
sudo apt upgrade -y
sudo reboot
sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
sudo apt update
sudo apt install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup
systemctl status mssql-server --no-pager
sudo apt install net-tools
sudo netstat -tnlp | grep sqlservr
Allow ssh and enable firewall
sudo ufw allow 22
sudo ufw allow 1433
sudo ufw allow 1434
sudo ufw enable
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt update
sudo apt install -y mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
sqlcmd -S localhost -U SA -P 'Password'
If successful, you should get a command prompt: 1>.
Copy yourdbname.mdf and yourdbname_log.ldf to the /var/opt/mssql/data/ directory. Set the owner and permissions to mssql.
sudo cp yourdbname* /var/opt/mssql/data/
sudo su
Chown mssql:mssql /var/opt/mssql/data/yourdbname*
chmod u=+rw,g=+rw,o=-rw /var/opt/mssql/data/yourdbname*
Run sql on the master
USE master;
CREATE DATABASE yourdbname
ON PRIMARY (FILENAME = '/var/opt/mssql/data/yourdbname.mdf'),
(FILENAME = '/var/opt/mssql/data/yourdbname_log.ldf')
FOR ATTACH
Good evening, I have tried to do the steps you mention but still it throws an error of (SQLSTATE [08001]: [Microsoft] [ODBC Driver 17 for SQL Server] SSL Provider: [error: 1425F102: SSL routines: ssl_choose_client_version: unsupported protocol] (SQL: select * from sys.sysobjects where id = object_id (migrations) and xtype in ('U', 'V'))
). I am running a Laravel 8 api on an ubuntu 20.04 server, which must be connected to SQL Server 2012 I have followed the step by step you have written and it did not work for me, even the one from microsoft using this link (https: // docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver15).
If anyone has any ideas I would really appreciate it, thank you.