forked from docs/doc-exports
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
56 lines
7.9 KiB
HTML
56 lines
7.9 KiB
HTML
<a name="ddm_06_0006"></a><a name="ddm_06_0006"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Schema</h1>
|
|
<div id="body1585554409299"><div class="section" id="ddm_06_0006__section1539512419299"><h4 class="sectiontitle">Prerequisites</h4><ul id="ddm_06_0006__ul48348216616"><li id="ddm_06_0006__li5834621868">You have logged in to the DDM console.</li><li id="ddm_06_0006__li81891348162918">The DDM instance is in the <strong id="ddm_06_0006__b1811316144210">Running</strong> state.</li><li id="ddm_06_0006__li4660135711150">Do not modify or delete the internal accounts (DDMRW*, DDMR*, and DDMREP*) created on data nodes. Otherwise, services will be affected.<div class="note" id="ddm_06_0006__note187511351871"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="ddm_06_0006__ul73181259999"><li id="ddm_06_0006__li1831815597910">The internal account name is in the format: Fixed prefix (such as DDMRW, DDMR, or DDMREP) + Hash value of the data node ID.</li><li id="ddm_06_0006__li1531810595919">A random password is generated, which contains 16 to 32 characters.</li><li id="ddm_06_0006__li1142674323110">All instances associated with one schema must have the same major MySQL version.</li><li id="ddm_06_0006__li821831115619">Multiple schemas can be created in a DDM instance and associated with the same data node. One DDM instance can be associated with either RDS for MySQL or GaussDB(for MySQL) instances, but not both.</li><li id="ddm_06_0006__li6623110185810">One data node cannot be associated with schemas in different DDM instances.</li><li id="ddm_06_0006__li14997175120226">If you create a sharded schema, more than one shard will be generated in the schema. Shard names follow the rule: <em id="ddm_06_0006__i1374319143254"><schemaname></em>_<em id="ddm_06_0006__i8592920182516"><number></em>. <em id="ddm_06_0006__i1831119254253"><number></em> here indicates a four-digit number starting from 0000. This number will be incremented by one. For example, if a schema name is <strong id="ddm_06_0006__b286725317219">db_cbb5</strong> and there are 2 shards, the shard names are <strong id="ddm_06_0006__b010314573211">db_cbb5_0000</strong> and <strong id="ddm_06_0006__b820319015319">db_cbb5_0001</strong>.</li><li id="ddm_06_0006__li48531753652">Read-only instances cannot be associated with the schema as data nodes.</li></ul>
|
|
</div></div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="ddm_06_0006__section1689775465519"><h4 class="sectiontitle">Procedure</h4><ol id="ddm_06_0006__ol195402921411"><li id="ddm_06_0006__li1095412915144"><span>In the navigation pane, choose <strong id="ddm_06_0006__b123815223452">Instances</strong>. In the instance list, locate the DDM instance that you want to create a schema for and click <strong id="ddm_06_0006__b19156308236">Create Schema</strong> in the <strong id="ddm_06_0006__b196591812141318">Operation</strong> column.</span></li><li id="ddm_06_0006__li13864105241412"><span>On the <strong id="ddm_06_0006__b1179691795817">Create Schema</strong> page, set required parameters by referring to <a href="#ddm_06_0006__table5532135017574">Table 1</a>, and click <strong id="ddm_06_0006__b107271041175813">Next</strong>.</span><p><p id="ddm_06_0006__p8179824993"></p>
|
|
|
|
<div class="tablenoborder"><a name="ddm_06_0006__table5532135017574"></a><a name="table5532135017574"></a><table cellpadding="4" cellspacing="0" summary="" id="ddm_06_0006__table5532135017574" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="ddm_06_0006__row353345017579"><th align="left" class="cellrowborder" valign="top" width="23.76%" id="mcps1.3.2.2.2.2.2.2.3.1.1"><p id="ddm_06_0006__p95331750165712"><strong id="ddm_06_0006__b12823121081518">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="76.24%" id="mcps1.3.2.2.2.2.2.2.3.1.2"><p id="ddm_06_0006__p10533105095717"><strong id="ddm_06_0006__b1916771211516">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ddm_06_0006__row19533125035715"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.2.2.2.2.2.2.3.1.1 "><p id="ddm_06_0006__p753365017575">Sharding</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.2.2.2.2.2.2.3.1.2 "><ul id="ddm_06_0006__ul74001251212"><li id="ddm_06_0006__li1340016520112"><strong id="ddm_06_0006__b39899150153">Sharded</strong>: indicates that one schema can be associated with multiple data nodes, and all shards will be evenly distributed across the nodes.</li><li id="ddm_06_0006__li1400051416"><strong id="ddm_06_0006__b18641171717151">Unsharded</strong>: indicates that one schema can be associated with only one data node, and only one shard can be created on the RDS instance.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ddm_06_0006__row125331450105711"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.2.2.2.2.2.2.3.1.1 "><p id="ddm_06_0006__p195331650125715">Schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.2.2.2.2.2.2.3.1.2 "><p id="ddm_06_0006__p19533150125714">The name contains 2 to 48 characters and must start with a lowercase letter. Only lowercase letters, digits, and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ddm_06_0006__row11533155025710"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.2.2.2.2.2.2.3.1.1 "><p id="ddm_06_0006__p65331550125713">Account</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.2.2.2.2.2.2.3.1.2 "><p id="ddm_06_0006__p5533165019574">The DDM account that needs to be associated with the schema.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ddm_06_0006__row14487127903"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.2.2.2.2.2.2.3.1.1 "><p id="ddm_06_0006__p1648719713012">Data Nodes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.2.2.2.2.2.2.3.1.2 "><p id="ddm_06_0006__p448716717013">Select only the data nodes that are in the same VPC as your DDM instance and not in use by other DDM instances. DDM will create databases on the selected data nodes without affecting their existing databases and tables.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ddm_06_0006__row895111580489"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.2.2.2.2.2.2.3.1.1 "><p id="ddm_06_0006__p39936411103">Shards</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.2.2.2.2.2.2.3.1.2 "><p id="ddm_06_0006__p799313412102">The total shards are the shards on all data nodes. There cannot be more data nodes than there are shards in the schema. Each data node has to have at least one shard assigned. Recommended shards per data node: 8 to 64.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li><li id="ddm_06_0006__li756113429617"><span>Enter a database account with the required permissions and click <strong id="ddm_06_0006__b128231127191619">Test Connection</strong>.</span><p><div class="note" id="ddm_06_0006__note72644431635"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_06_0006__p47423332334">Required permissions: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER WITH GRANT OPTION</p>
|
|
<p id="ddm_06_0006__p590985054416">You can create a database account for the RDS for MySQL instance and assign it the above permissions in advance.</p>
|
|
</div></div>
|
|
</p></li><li id="ddm_06_0006__li13482122095216"><span>After the test becomes successful, click <strong id="ddm_06_0006__b581224131918">Finish</strong>.</span></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_03_0006.html">Schema Management</a></div>
|
|
</div>
|
|
</div>
|
|
|