doc-exports/docs/fg/umn/functiongraph_03_0130.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

19 lines
2.7 KiB
HTML

<a name="functiongraph_03_0130"></a><a name="functiongraph_03_0130"></a>
<h1 class="topictitle1">How Does a Function Access the MySQL Database?</h1>
<div id="body1590129418493"><p id="functiongraph_03_0130__p93713224415">Perform the following operations:</p>
<ol id="functiongraph_03_0130__ol1424543551015"><li id="functiongraph_03_0130__li9246335101019">Check whether the MySQL database is deployed in a VPC.<ul id="functiongraph_03_0130__ul59348336115"><li id="functiongraph_03_0130__li1993412333116">Yes: Configure the same VPC and subnet as the MySQL database for the function by referring to section "Configuring VPC Access".</li><li id="functiongraph_03_0130__li116503171213">No: See <a href="functiongraph_03_0834.html">How Do I Configure External Network Access?</a></li></ul>
</li><li id="functiongraph_03_0130__li132931131134015">Search for MySQL templates and select the one with the desired runtime, as shown in <a href="#functiongraph_03_0130__fig118911551163113">Figure 1</a>. Set the parameters as required and click <strong id="functiongraph_03_0130__b21619520239">Create Function</strong>.<div class="fignone" id="functiongraph_03_0130__fig118911551163113"><a name="functiongraph_03_0130__fig118911551163113"></a><a name="fig118911551163113"></a><span class="figcap"><b>Figure 1 </b>Selecting a function template</span><br><span><img id="functiongraph_03_0130__image589195113317" src="en-us_image_0000001631986292.png"></span></div>
</li><li id="functiongraph_03_0130__li17333448122815">After the MySQL function is created, choose <strong id="functiongraph_03_0130__b87673158243">Configuration</strong> &gt; <strong id="functiongraph_03_0130__b73871613102419">Environment Variables</strong>, enable encryption as required (see <a href="#functiongraph_03_0130__fig8962192433716">Figure 2</a>), and click <strong id="functiongraph_03_0130__b107198107257">Save</strong>.<div class="fignone" id="functiongraph_03_0130__fig8962192433716"><a name="functiongraph_03_0130__fig8962192433716"></a><a name="fig8962192433716"></a><span class="figcap"><b>Figure 2 </b>Enabling encryption</span><br><span><img id="functiongraph_03_0130__image39621024163719" src="en-us_image_0000001632148468.png"></span></div>
<div class="p" id="functiongraph_03_0130__p126387424551"><div class="note" id="functiongraph_03_0130__note1533354464318"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_03_0130__p1433454444311">If the function needs to access RDS APIs, create an agency and grant required permissions.</p>
</div></div>
</div>
</li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_03_0355.html">External Resource Access FAQs</a></div>
</div>
</div>