Secure initial account
Upon the creation of a cluster, the initialroot user of the cluster is generated automatically. The root user is granted the root privileges, which are the collection of all privileges within the cluster. We recommend you secure this user account and avoid using it in production to prevent misuse.
The database automatically assigns an empty password to the root user when the cluster is created. Follow these procedures to set a new password for the root user:
-
Connect to the database via your MySQL client with the username
rootand an empty password. -
Reset the password of the
rootuser by executing the following SQL:
- Keep the password properly after resetting it. If you forgot the password, see Reset lost root password for detailed instructions.
- After completing the post-deployment setup, you can create new users and roles to manage the privileges within your team. See Manage user privileges for detailed instructions.
Set necessary system variables
To allow your cluster to work properly in production, you need to set the following system variables:enable_profile
Description
The boolean switch that controls whether to send the profile of a query for analysis. The default value isfalse, which means no profile is required.
Setting this variable to true can affect the concurrency of the database.
Recommended value
false-
Set
enable_profiletofalseglobally:
enable_pipeline_engine
Description
The boolean switch that controls whether to enable the pipeline execution engine.true indicates enabled and false indicates the opposite. Default value: true.
Recommended value
true-
Set
enable_pipeline_enginetotrueglobally:
parallel_fragment_exec_instance_num
Description
The number of instances used to scan nodes on each BE. The default value is1.
Recommended value
If you have enabled the pipeline engine, you can set this variable to1.
If you have not enabled the pipeline engine, you should set it to half the number of CPU cores.
-
Set
parallel_fragment_exec_instance_numto1globally:
Set user property
If you have created new users in your cluster, you need to enlarge their maximum connection number (to1000, for example):