diff --git a/test.log b/test.log new file mode 100644 index 0000000000000000000000000000000000000000..4f6ce741d30d1395a0f9f7b2c2e9e71d518947ed --- /dev/null +++ b/test.log @@ -0,0 +1,301 @@ +[admin@os-goldmine011163043248.nt12 /home] +$ssh root@121.199.33.45 +root@121.199.33.45's password: + +Welcome to Alibaba Cloud Elastic Compute Service ! + +[root@iZbp1blmxfqp6r11j47zpnZ ~]# mysql +-bash: mysql: command not found +[root@iZbp1blmxfqp6r11j47zpnZ ~]# yum install mysql-server -y +Repository epel is listed more than once in the configuration +AnolisOS-8 - AppStream 30 MB/s | 8.8 MB 00:00 +AnolisOS-8 - BaseOS 12 MB/s | 4.5 MB 00:00 +AnolisOS-8 - PowerTools 15 MB/s | 2.3 MB 00:00 +Dependencies resolved. +============================================================================================================================================= + Package Architecture Version Repository Size +============================================================================================================================================= +Installing: + mysql-server x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 25 M +Installing dependencies: + checkpolicy x86_64 2.9-1.el8 BaseOS 345 k + libaio x86_64 0.3.112-1.el8 BaseOS 31 k + mariadb-connector-c-config noarch 3.1.11-2.an8 AppStream 14 k + mecab x86_64 0.996-1.module+an8.4.0+10570+ea0623f5.9 AppStream 392 k + mysql x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 12 M + mysql-common x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 133 k + mysql-errmsg x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 597 k + policycoreutils-python-utils noarch 2.9-16.0.1.an8 BaseOS 251 k + protobuf-lite x86_64 3.5.0-13.an8 AppStream 147 k + python3-audit x86_64 3.0-0.17.20191104git1c2f876.el8 BaseOS 85 k + python3-libsemanage x86_64 2.9-6.an8 BaseOS 126 k + python3-policycoreutils noarch 2.9-16.0.1.an8 BaseOS 2.2 M + python3-setools x86_64 4.3.0-2.an8 BaseOS 625 k +Enabling module streams: + mysql 8.0 + +Transaction Summary +============================================================================================================================================= +Install 14 Packages + +Total download size: 42 M +Installed size: 206 M +Downloading Packages: +(1/14): mariadb-connector-c-config-3.1.11-2.an8.noarch.rpm 314 kB/s | 14 kB 00:00 +(2/14): mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64.rpm 3.3 MB/s | 133 kB 00:00 +(3/14): mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64.rpm 4.2 MB/s | 392 kB 00:00 +(4/14): mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64.rpm 14 MB/s | 597 kB 00:00 +(5/14): protobuf-lite-3.5.0-13.an8.x86_64.rpm 11 MB/s | 147 kB 00:00 +(6/14): checkpolicy-2.9-1.el8.x86_64.rpm 14 MB/s | 345 kB 00:00 +(7/14): libaio-0.3.112-1.el8.x86_64.rpm 3.8 MB/s | 31 kB 00:00 +(8/14): policycoreutils-python-utils-2.9-16.0.1.an8.noarch.rpm 6.0 MB/s | 251 kB 00:00 +(9/14): python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm 8.7 MB/s | 85 kB 00:00 +(10/14): python3-libsemanage-2.9-6.an8.x86_64.rpm 11 MB/s | 126 kB 00:00 +(11/14): python3-policycoreutils-2.9-16.0.1.an8.noarch.rpm 28 MB/s | 2.2 MB 00:00 +(12/14): python3-setools-4.3.0-2.an8.x86_64.rpm 25 MB/s | 625 kB 00:00 +(13/14): mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64.rpm 21 MB/s | 12 MB 00:00 +(14/14): mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64.rpm 35 MB/s | 25 MB 00:00 +--------------------------------------------------------------------------------------------------------------------------------------------- +Total 52 MB/s | 42 MB 00:00 +Running transaction check +Transaction check succeeded. +Running transaction test +Transaction test succeeded. +Running transaction + Preparing : 1/1 + Installing : mariadb-connector-c-config-3.1.11-2.an8.noarch 1/14 + Installing : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 2/14 + Installing : mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 3/14 + Installing : mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 4/14 + Installing : python3-setools-4.3.0-2.an8.x86_64 5/14 + Installing : python3-libsemanage-2.9-6.an8.x86_64 6/14 + Installing : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 7/14 + Installing : libaio-0.3.112-1.el8.x86_64 8/14 + Installing : checkpolicy-2.9-1.el8.x86_64 9/14 + Installing : python3-policycoreutils-2.9-16.0.1.an8.noarch 10/14 + Installing : policycoreutils-python-utils-2.9-16.0.1.an8.noarch 11/14 + Installing : protobuf-lite-3.5.0-13.an8.x86_64 12/14 + Installing : mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 13/14 + Running scriptlet: mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 13/14 + Running scriptlet: mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 14/14 + Installing : mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 14/14 + Running scriptlet: mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 14/14 +ValueError: File context for /var/log/mysql(/.*)? already defined + + Verifying : mariadb-connector-c-config-3.1.11-2.an8.noarch 1/14 + Verifying : mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 2/14 + Verifying : mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 3/14 + Verifying : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 4/14 + Verifying : mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 5/14 + Verifying : mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 6/14 + Verifying : protobuf-lite-3.5.0-13.an8.x86_64 7/14 + Verifying : checkpolicy-2.9-1.el8.x86_64 8/14 + Verifying : libaio-0.3.112-1.el8.x86_64 9/14 + Verifying : policycoreutils-python-utils-2.9-16.0.1.an8.noarch 10/14 + Verifying : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 11/14 + Verifying : python3-libsemanage-2.9-6.an8.x86_64 12/14 + Verifying : python3-policycoreutils-2.9-16.0.1.an8.noarch 13/14 + Verifying : python3-setools-4.3.0-2.an8.x86_64 14/14 + +Installed: + checkpolicy-2.9-1.el8.x86_64 libaio-0.3.112-1.el8.x86_64 + mariadb-connector-c-config-3.1.11-2.an8.noarch mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 + mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 + mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 + policycoreutils-python-utils-2.9-16.0.1.an8.noarch protobuf-lite-3.5.0-13.an8.x86_64 + python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 python3-libsemanage-2.9-6.an8.x86_64 + python3-policycoreutils-2.9-16.0.1.an8.noarch python3-setools-4.3.0-2.an8.x86_64 + +Complete! +[root@iZbp1blmxfqp6r11j47zpnZ ~]# service mysqld start +Redirecting to /bin/systemctl start mysqld.service +[root@iZbp1blmxfqp6r11j47zpnZ ~]# mysql_secure_installation -D + +Securing the MySQL server deployment. + +Connecting to MySQL using a blank password. + +VALIDATE PASSWORD COMPONENT can be used to test passwords +and improve security. It checks the strength of password +and allows the users to set only those passwords which are +secure enough. Would you like to setup VALIDATE PASSWORD component? + +Press y|Y for Yes, any other key for No: y + +There are three levels of password validation policy: + +LOW Length >= 8 +MEDIUM Length >= 8, numeric, mixed case, and special characters +STRONG Length >= 8, numeric, mixed case, special characters and dictionary file + +Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 +Please set the password for root here. + +New password: + +Re-enter new password: + +Estimated strength of the password: 100 +Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y +By default, a MySQL installation has an anonymous user, +allowing anyone to log into MySQL without having to have +a user account created for them. This is intended only for +testing, and to make the installation go a bit smoother. +You should remove them before moving into a production +environment. + +Remove anonymous users? (Press y|Y for Yes, any other key for No) : y +Success. + + +Normally, root should only be allowed to connect from +'localhost'. This ensures that someone cannot guess at +the root password from the network. + +Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y +Success. + +By default, MySQL comes with a database named 'test' that +anyone can access. This is also intended only for testing, +and should be removed before moving into a production +environment. + + +Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y + - Dropping test database... +Success. + + - Removing privileges on test database... +Success. + +Reloading the privilege tables will ensure that all changes +made so far will take effect immediately. + +Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y +Success. + +All done! +[root@iZbp1blmxfqp6r11j47zpnZ ~]# mysql -p'Q@hid686' +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 10 +Server version: 8.0.26 Source distribution + +Copyright (c) 2000, 2021, Oracle and/or its affiliates. + +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. + +mysql> create database test; +Query OK, 1 row affected (0.02 sec) + +mysql> use test; +Database changed +mysql> create table hola(bonj text); +Query OK, 0 rows affected (0.08 sec) + +mysql> insert into test.hola(bonj) values("Mundo"); +Query OK, 1 row affected (0.01 sec) + +mysql> insert into test.hola(bonj) values("Lundo"); +Query OK, 1 row affected (0.00 sec) + +mysql> insert into test.hola(bonj) values("测试"); +Query OK, 1 row affected (0.01 sec) + +mysql> select * from hola; ++--------+ +| bonj | ++--------+ +| Mundo | +| Lundo | +| 测试 | ++--------+ +3 rows in set (0.00 sec) + +mysql> exit; +Bye +[root@iZbp1blmxfqp6r11j47zpnZ ~]# service mysqld stop && yum remove -y mysql-server +Redirecting to /bin/systemctl stop mysqld.service +Repository epel is listed more than once in the configuration +Dependencies resolved. +============================================================================================================================================= + Package Architecture Version Repository Size +============================================================================================================================================= +Removing: + mysql-server x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 @AppStream 121 M +Removing unused dependencies: + checkpolicy x86_64 2.9-1.el8 @BaseOS 1.3 M + libaio x86_64 0.3.112-1.el8 @BaseOS 50 k + mariadb-connector-c-config noarch 3.1.11-2.an8 @AppStream 497 + mecab x86_64 0.996-1.module+an8.4.0+10570+ea0623f5.9 @AppStream 2.1 M + mysql x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 @AppStream 63 M + mysql-common x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 @AppStream 460 k + mysql-errmsg x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 @AppStream 8.8 M + policycoreutils-python-utils noarch 2.9-16.0.1.an8 @BaseOS 138 k + protobuf-lite x86_64 3.5.0-13.an8 @AppStream 450 k + python3-audit x86_64 3.0-0.17.20191104git1c2f876.el8 @BaseOS 325 k + python3-libsemanage x86_64 2.9-6.an8 @BaseOS 438 k + python3-policycoreutils noarch 2.9-16.0.1.an8 @BaseOS 5.4 M + python3-setools x86_64 4.3.0-2.an8 @BaseOS 2.6 M + +Transaction Summary +============================================================================================================================================= +Remove 14 Packages + +Freed space: 206 M +Running transaction check +Transaction check succeeded. +Running transaction test +Transaction test succeeded. +Running transaction + Preparing : 1/1 + Running scriptlet: mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 1/1 + Running scriptlet: mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 1/14 + Erasing : mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 1/14 + Running scriptlet: mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 1/14 + Erasing : mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 2/14 + Erasing : policycoreutils-python-utils-2.9-16.0.1.an8.noarch 3/14 + Erasing : python3-policycoreutils-2.9-16.0.1.an8.noarch 4/14 + Erasing : mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 5/14 + Erasing : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 6/14 + Erasing : mariadb-connector-c-config-3.1.11-2.an8.noarch 7/14 + Erasing : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 8/14 + Erasing : checkpolicy-2.9-1.el8.x86_64 9/14 + Erasing : python3-libsemanage-2.9-6.an8.x86_64 10/14 + Erasing : python3-setools-4.3.0-2.an8.x86_64 11/14 + Erasing : libaio-0.3.112-1.el8.x86_64 12/14 + Erasing : mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 13/14 + Running scriptlet: mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 13/14 + Erasing : protobuf-lite-3.5.0-13.an8.x86_64 14/14 + Running scriptlet: protobuf-lite-3.5.0-13.an8.x86_64 14/14 + Verifying : checkpolicy-2.9-1.el8.x86_64 1/14 + Verifying : libaio-0.3.112-1.el8.x86_64 2/14 + Verifying : mariadb-connector-c-config-3.1.11-2.an8.noarch 3/14 + Verifying : mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 4/14 + Verifying : mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 5/14 + Verifying : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 6/14 + Verifying : mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 7/14 + Verifying : mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 8/14 + Verifying : policycoreutils-python-utils-2.9-16.0.1.an8.noarch 9/14 + Verifying : protobuf-lite-3.5.0-13.an8.x86_64 10/14 + Verifying : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 11/14 + Verifying : python3-libsemanage-2.9-6.an8.x86_64 12/14 + Verifying : python3-policycoreutils-2.9-16.0.1.an8.noarch 13/14 + Verifying : python3-setools-4.3.0-2.an8.x86_64 14/14 + +Removed: + checkpolicy-2.9-1.el8.x86_64 libaio-0.3.112-1.el8.x86_64 + mariadb-connector-c-config-3.1.11-2.an8.noarch mecab-0.996-1.module+an8.4.0+10570+ea0623f5.9.x86_64 + mysql-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 + mysql-errmsg-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 mysql-server-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 + policycoreutils-python-utils-2.9-16.0.1.an8.noarch protobuf-lite-3.5.0-13.an8.x86_64 + python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 python3-libsemanage-2.9-6.an8.x86_64 + python3-policycoreutils-2.9-16.0.1.an8.noarch python3-setools-4.3.0-2.an8.x86_64 + +Complete! +[root@iZbp1blmxfqp6r11j47zpnZ ~]# rm -rf /var/lib/mysql +[root@iZbp1blmxfqp6r11j47zpnZ ~]# \ No newline at end of file