[root@3g3MplC6 ~]# mysql -uroot -pOUGiG=n-l8lY mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.7.20
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. --mysql5.7密码策略比较高,设置一下复杂度和长度 mysql> set global validate_password_policy=0; Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_length=1; Query OK, 0 rows affected (0.00 sec) --修改一下root用户的密码为'ffffff'(生产环境不建议这么操作) mysql> alter user root@localhost identified by 'ffffff'; Query OK, 0 rows affected (0.00 sec) --创建一个mysql数据库confluence,创建用户confluence,密码为confluencepwd mysql -uroot -p'ffffff' -e "create database confluence default character set utf8 collate utf8_bin;grant all on confluence.* to 'confluence'@'%' identified by 'confluencepwd';"