Creating an M-compatible Database and User
An M-compatible database must be created in a non-M-compatible database. Ensure that the templatem template database exists in the current environment.
gaussdb=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------+----------+-------------+-------------+-------------------
postgres | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/omm +
| | | | | omm=CTc/omm
template1 | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/omm +
| | | | | omm=CTc/omm
templatem | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/omm +
| | | | | omm=CTc/omm
(4 rows)
Note: After the upgrade from a version earlier than 505.2.0 to the latest version, if the templatem template database is not created in the basic package, the templatem template database will not be created after the upgrade. To use the M-compatible database, you need to create it by referring to the following example:
gaussdb=# CREATE DATABASE m_db dbcompatibility = 'M' template=templatem; gaussdb=# \c m_db Non-SSL connection (SSL connection is recommended when requiring high-security) You are now connected to database "m_db" as user "omm". m_db=# CREATE USER omm_test password '********'; m_db=# GRANT ALL privileges to omm_test;
For details about other operations after the M-compatible database is created, see SQL Reference.
A GaussDB cluster can have only one M-compatible database.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot