Closed WolfsParadise5 closed 1 year ago
Enclosing in single quotes should work:
./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn 'user:password@tcp(db.ip.address:port)/mdm'
The utilisation of single quotes has resulted to the same error as before
Command Output : flag provided but not defined: -storage-dsn
I have also tested another way of input and the same issue arises
Command test Input : ./nanomdm-linux-amd64-v0.5.0/nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn='user:password@tcp(db.ip.address:port)/mdm'
Command Output : flag provided but not defined: -storage-dsn
Eh, sorry, I misread the original error. The current tagged release (v0.5.0) still uses -dsn
, not -storage-dsn
. The flag was changed to -storage-dsn
after v0.5.0.
Ah, good catch Kory. Yes, the flag name changed.
fwiw this is documented in the ops guide. perhaps we can make that more visible.
or I just need to get on top of a newer release. :)
My apologies for the late reply but thanks for the clarification. Command works now on v0.5 with -dsn
To be frank would be preferable to make it clear in the example explaining the usage of mysql if a newer version is not out yet since it may get a little confusing :)
Following is an error occured on Ubuntu Server 22.04LTS and also on MacOS Ventura 13.2.1 with their respective os-specific versions of NanoMDM(both on amd64 platforms) while configuring runtime with an external SQL Server.
./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn user:password@tcp(db.ip.address:port)/mdm
Command output:
-bash: syntax error near unexpected token
('`Normal workarounds to this leads to the following error as follows:
./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn "user:password@tcp(db.ip.address:port)/mdm"
./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn user:password@tcp\(db.ip.address:port\)/mdm
Command output:
flag provided but not defined: -storage-dsn