I have some
php scripts that use
mysqli() to connect to
MySQL which is located on the same server. I currently have the connection stored outside of my sites
root and I am using
include() to make the connection.
MySQL servers it is recommended to use an
ssh connection. For my environment, should I take any other measures to secure my connection?
Also is it more of a concern that
mysql is on the same server?
Lastly I am guessing I would want to prevent any errors resulting from the connection being displayed as they would give connection information.
Im also curious as to if/when I would want to
close() these connections. I am guessing I would want to close them but only after I am done accessing the database on a particular page.
Still looking for the above information as of 12.11.2019