|
| 1 | +[root@localhost yum.repos.d]# cat /etc/yum.repos.d/cloudstack.repo |
| 2 | +[cloudstack] |
| 3 | +name=cloudstack |
| 4 | +baseurl=http://download.cloudstack.org/el/8/4.17/ |
| 5 | +enabled=1 |
| 6 | +gpgcheck=0 |
| 7 | + |
| 8 | +[root@localhost ~]# yum deplist cloudstack-management cloudstack-common cloudstack-usage cloudstack-cli | awk '/provider:/ {print $2}' | sort -u | grep -v java | grep -v cloudstack | xargs yum install -y |
| 9 | + |
| 10 | +hostnamectl set-hostname localhost --transient |
| 11 | + |
| 12 | +[root@localhost ~]# iptables-restore < /etc/sysconfig/iptables |
| 13 | +iptables -F ? |
| 14 | + |
| 15 | +[root@localhost ~]# systemctl stop firewalld |
| 16 | +[root@localhost ~]# systemctl disable firewalld |
| 17 | + |
| 18 | +rm -fr /var/lib/mysql/* |
| 19 | + |
| 20 | +[root@localhost ~]# systemctl stop mysqld |
| 21 | +[root@localhost ~]# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" |
| 22 | +[root@localhost ~]# systemctl start mysqld |
| 23 | +[root@localhost ~]# |
| 24 | +[root@localhost ~]# mysql -u root |
| 25 | +Welcome to the MySQL monitor. Commands end with ; or \g. |
| 26 | +Your MySQL connection id is 2 |
| 27 | +Server version: 5.7.32-log MySQL Community Server (GPL) |
| 28 | + |
| 29 | +Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. |
| 30 | + |
| 31 | +Oracle is a registered trademark of Oracle Corporation and/or its |
| 32 | +affiliates. Other names may be trademarks of their respective |
| 33 | +owners. |
| 34 | + |
| 35 | +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. |
| 36 | + |
| 37 | +mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'P@ssword123'; |
| 38 | +ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement |
| 39 | +mysql> flush privileges; |
| 40 | +Query OK, 0 rows affected (0.07 sec) |
| 41 | + |
| 42 | +mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'P@ssword123'; |
| 43 | +Query OK, 0 rows affected (0.06 sec) |
| 44 | + |
| 45 | +mysql> flush privileges; |
| 46 | +Query OK, 0 rows affected (0.02 sec) |
| 47 | + |
| 48 | +mysql> ^DBye |
| 49 | + |
| 50 | + |
| 51 | +[root@localhost ~]# systemctl stop mysqld |
| 52 | + |
| 53 | +[root@localhost ~]# |
| 54 | +[root@localhost ~]# systemctl unset-environment MYSQLD_OPTS |
| 55 | +[root@localhost ~]# systemctl start mysqld |
| 56 | +[root@localhost ~]# mysql -u root |
| 57 | +ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) |
| 58 | +[root@localhost ~]# mysql -u root -p |
| 59 | +Enter password: |
| 60 | +Welcome to the MySQL monitor |
| 61 | + |
| 62 | + |
| 63 | +In /etc/my.cnf: |
| 64 | +server-id=1 |
| 65 | +sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION" |
| 66 | +binlog-format = 'ROW' |
| 67 | +log-bin=mysql-bin |
| 68 | +max_connections=700 |
| 69 | +innodb_lock_wait_timeout=600 |
| 70 | +innodb_rollback_on_timeout=1 |
| 71 | +datadir=/var/lib/mysql |
| 72 | + |
| 73 | +mysql> SHOW VARIABLES LIKE 'validate_password%'; |
| 74 | +mysql> SET GLOBAL validate_password_length = 5; |
| 75 | +mysql> set global validate_password_number_count = 0; |
| 76 | +mysql> set global validate_password_mixed_case_count = 0; |
| 77 | +Query OK, 0 rows affected (0.00 sec) |
| 78 | + |
| 79 | +mysql> set global validate_password_special_char_count = 0; |
| 80 | +Query OK, 0 rows affected (0.00 sec) |
| 81 | + |
| 82 | +mysql> set validate_password_policy = 'LOW'; |
| 83 | +ERROR 1229 (HY000): Variable 'validate_password_policy' is a GLOBAL variable and should be set with SET GLOBAL |
| 84 | +mysql> set global validate_password_policy = 'LOW'; |
| 85 | +Query OK, 0 rows affected (0.00 sec) |
0 commit comments