Skip to main content

Usage of Special Characters in Passwords

TDengine user passwords must meet the following rules:

  1. The username must not exceed 23 bytes.
  2. The password length must be between 8 and 255 characters.
  3. The range of password characters:
    1. Uppercase letters: A-Z
    2. Lowercase letters: a-z
    3. Numbers: 0-9
    4. Special characters: ! @ # $ % ^ & * ( ) - _ + = [ ] { } : ; > < ? | ~ , .
  4. When strong password is enabled (EnableStrongPassword 1, enabled by default), the password must contain at least three of the following categories: uppercase letters, lowercase letters, numbers, and special characters. When not enabled, there are no restrictions on character types.

Usage Guide for Special Characters in Different Components

Take the username user1 and password Ab1!@#$%^&*()-_+=[]{} as an example.

CREATE USER user1 PASS 'Ab1!@#$%^&*()-_+=[]{}';

In the TDengine Command Line Interface (CLI), note the following:

  • If the -p parameter is used without a password, you will be prompted to enter a password, and any acceptable characters can be entered.
  • If the -p parameter is used with a password, and the password contains special characters, single quotes must be used.

Login with user user1:

taos -u user1 -p'Ab1!@#$%^&*()-_+=[]{}'
taos -u user1 -pAb1\!\@\#\$\%\^\&\*\(\)\-\_\+\=\[\]\{\}