简体   繁体   中英

MSSQL: The configuration file '/var/opt/mssql/mssql.conf' failed to load (Ubuntu)

I have an issue to install MSSQL on my Linux(Ubuntu 16.04) Server.

I have used the manual from Microsoft but I always fail on the same stage. Actually, Docker is not an alternative due to Kernal issues.

After:

sudo apt-get install -y mssql-server

I'm supposed to do

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

This returns after answering all questions:

sqlservr[8383]: sqlservr: The configuration file '/var/opt/mssql/mssql.conf' failed to load (error: The INI file could not be opened. Errno [2] Filename [mssql.conf]).

I can access the config file and it seems to be usable by the script as well. My Linux skills are not good enough to resolve this issue.

To answer some questions that were raised:

  1. I tried sudo
  2. cat the file returns the content as expected

Try running mssql server as root first (stop the service, run it as root, with /opt/mssql/bin/sqlservr ) and see if it works that way. If it does, stop the mssql server and fix the ownership of the mssql dir with sudo chown -R mssql:mssql /var/opt/mssql ). More info on this answer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM