@MayankBargali-MSFT
Thanks for your replay
I will send you the information which confirms that my statment ist true.
*With following config we control the host:
*Here is the code:
import os
import mysql.connector
RCPDB_CONNECTION = None
def get_rcpdb_connection():
global RCPDB_CONNECTION
if RCPDB_CONNECTION is None or not RCPDB_CONNECTION.is_connected():
RCPDB_CONNECTION = mysql.connector.connect(
host=os.environ['RCPDB_HOST'],
user=os.environ['RCPDB_USER'],
password=os.environ['RCPDB_PASS'],
database=os.environ['RCPDB_DB']
)
return RCPDB_CONNECTION
*But we still got the Error (from Livemetrics):
Exception while executing function: Functions.CoverLetterData <--- Result: Failure Exception: ProgrammingError: 1045 (28000): Access denied for user 'mysmarth_it'@'20.203.129.224' (using password: YES) Stack: File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 398, in _handle__invocation_request call_result = await self._loop.run_in_executor( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 602, in _run_sync_func return ExtensionManager.get_sync_invocation_wrapper(context, File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper result = function(**args) File "/home/site/wwwroot/CoverLetterData/init.py", line 121, in main data = get_coverletter_data_by_guid(guid) File "/home/site/wwwroot/CoverLetterData/init.py", line 59, in get_coverletter_data_by_guid connection = get_rcpdb_connection() File "/home/site/wwwroot/shared/rcpdb.py", line 10, in get_rcpdb_connection RCPDB_CONNECTION = mysql.connector.connect( File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/init.py", line 179, in connect return MySQLConnection(*args, **kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/connection.py", line 95, in init self.connect(**kwargs) File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/abstracts.py", line 716, in connect self._open_connection() File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/connection.py", line 208, in _open_connection self._do_auth(self._user, self._password, File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/connection.py", line 144, in _do_auth self._auth_switch_request(username, password) File "/home/site/wwwroot/.python_packages/lib/site-packages/mysql/connector/connection.py", line 177, in _auth_switch_request raise errors.get_exception(packet)