snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.93k stars 3.16k forks source link

Can not connect to REMOTE mySQL Database #12010

Closed jcookatlas closed 1 year ago

jcookatlas commented 1 year ago

Debug mode

Describe the bug

When attempting 'basic' install - except using REMOTE mySQL server (installed mysql-client vs. mysql-server) the compose build works and I can get to the pre-flight check page... On Pre-Flight I receive an error stating "SQLSTATE[HY000] [1045] Access denied for user 'snipe_it_user'@'XX.XX.XX.XX' (using password: YES) (SQL: select 2 + 2)'.

From the mysql cli on the snipe-it application server, I can successfully log into the remote mysql server as 'snipe_it_user'@'XX.XX.XX.XX' AND when executing SHOW GRANTS in mysql CLI, the server responds: GRANT ALL PRIVILEGES ON snipe_it.* TO snipe_it_user@XX.XX.XX.XX WITH GRANT OPTION (using the same credentials that are in .env).

UFW is inactive on BOTH snipe-it application server and mysql server (for testing purposes in an isolated environment)

Pre-Flight Error Message:

pre-flight error

mySQL CLI Responce:

mysql show grants from snipe-it vm

Reproduction steps

  1. Tried install again
  2. ...

Expected behavior

Should connect to REMOTE (same sub-net) mysql server.

Screenshots

No response

Snipe-IT Version

As GIT cloned 21-OCT-2022

Operating System

Ubunt 20.0.4

Web Server

Apache2

PHP Version

7.4.3

Operating System

Windows 11

Browser

Firefox

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

php -m:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Additional context

Fresh install

jcookatlas commented 1 year ago

Please dis-regard... I'm a dummy...

I have special characters in the password and had not encapsulated them properly in quotations in the .env configuration file.

Turns out that non-quotation encapsulated special characters NeVeR EvEr pass through properly...

Sorry for the inconvenience. Please disregard.

snipe commented 1 year ago

Glad you're sorted :)