┌──[root@liruilongs.github.io]-[~] └─$ldd --version ldd (GNU libc) 2.38 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the sourcefor copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
┌──[root@liruilongs.github.io]-[/data/mysql3306/data] └─$sudo lvremove /dev/mapper/openeuler-swap Do you really want to remove active logical volume openeuler/swap? [y/n]: y Logical volume "swap" successfully removed.
逻辑卷 openeuler-root 扩展到剩余的全部可用空间
1 2 3 4
┌──[root@liruilongs.github.io]-[/data/mysql3306/data] └─$sudo lvextend -l +100%FREE /dev/mapper/openeuler-root Size of logical volume openeuler/root changed from 11.59 GiB (2968 extents) to <13.00 GiB (3327 extents). Logical volume openeuler/root successfully resized.
┌──[root@liruilongs.github.io]-[~] └─$/opt/mysql84/bin/mysqld 2024-10-08T14:48:24.843155Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2024-10-08T14:48:25.014506Z 0 [System] [MY-010116] [Server] /opt/mysql84/bin/mysqld (mysqld 8.4.3) starting as process 66654 2024-10-08T14:48:25.016234Z 0 [Warning] [MY-010091] [Server] Can't create test file /opt/mysql-8.4.3-linux-glibc2.28-x86_64/data/mysqld_tmp_file_case_insensitive_test.lower-test 2024-10-08T14:48:25.016348Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/mysql-8.4.3-linux-glibc2.28-x86_64/data/ is case insensitive 2024-10-08T14:48:25.016439Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 2024-10-08T14:48:25.016492Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-10-08T14:48:25.016886Z 0 [System] [MY-010910] [Server] /opt/mysql84/bin/mysqld: Shutdown complete (mysqld 8.4.3) MySQL Community Server - GPL. 2024-10-08T14:48:25.016889Z 0 [System] [MY-015016] [Server] MySQL Server - end. ┌──[root@liruilongs.github.io]-[~] └─$
........ 2024-10-08T14:48:25.016439Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read"Security" section of the manual to find out how to run mysqld as root! 2024-10-08T14:48:25.016492Z 0 [ERROR] [MY-010119] [Server] Aborting
┌──[root@liruilongs.github.io]-[/opt/mysql84/bin] └─$echo"export PATH=$PATH:/opt/mysql84/bin/" >> ~/.bashrc ┌──[root@liruilongs.github.io]-[/opt/mysql84/bin] └─$source ~/.bashrc ┌──[root@liruilongs.github.io]-[/opt/mysql84/bin] └─$mysql -uroot -h127.0.0.1 -p'hde9_0vealB6' 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 8 Server version: 8.4.3
Copyright (c) 2000, 2024, 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'forhelp. Type '\c' to clear the current input statement.
mysql>
设置新的密码
1 2 3 4 5 6 7 8 9 10 11 12 13 14
mysql>select now(); ERROR 1820 (HY000): You must reset your password usingALTERUSER statement before executing this statement. mysql>alteruser'root'@'localhost' identified by'Liruilong1008'; Query OK, 0rows affected (0.01 sec)
┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$echo"export PATH=$PATH:/opt/mysql84/bin/" >> ~/.bashrc ┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$source ~/.bashrc ┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$mysql -uroot -h127.0.0.1 -p'9c6<f,sl:-Z*' 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 8 Server version: 8.4.3
Copyright (c) 2000, 2024, 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'forhelp. Type '\c' to clear the current input statement.
mysql> alter user 'root'@'localhost' identified by 'Liruilong1008'; Query OK, 0 rows affected (0.01 sec)
┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$sudo -u mysql84 /opt/mysql84/bin/mysql -uroot ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$sudo -u mysql84 /opt/mysql84/bin/mysql -uroot --socket=/data/mysql3306/run/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.4.3 MySQL Community Server - GPL Copyright (c) 2000, 2024, 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> flush privileges; Query OK, 0 rows affected (0.02 sec) mysql> alter user 'root'@'localhost' identified by '123456'; Query OK, 0 rows affected (0.01 sec) mysql>
重新修改密码,测试登陆
1 2 3 4 5 6 7
┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$sudo -u mysql84 /opt/mysql84/bin/mysqladmin -u root -p123456 shutdown --socket=/data/mysql3306/run/mysql.sock mysqladmin: [Warning] Using a password on the command line interface can be insecure. 2024-11-09T01:26:23.378262Z mysqld_safe mysqld from pid file /data/mysql3306/data/liruilongs.github.io.pid ended [1]+ 已完成 sudo -u mysql84 /opt/mysql84/bin/mysqld_safe --defaults-file=/data/mysql3306/my.cnf --skip-grant-tables --skip-networking ┌──[root@liruilongs.github.io]-[/data/mysql3306] └─$