tar -xvf mysql-5.7.35-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.35-linux-glibc2.12-x86_64 /usr/local/mysql
cd /usr/local/mysql
mkdir data
groupadd mysql
useradd -g mysql mysql
chown -R mysql:mysql ./
/usr/local/mysql/bin/mysqld --initialize --user=mysql --lower-case-table-names=0 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@iZbp107wjsak6cm77ldu5iZ mysql]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --lower-case-table-names=0 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
2024-06-14T09:44:15.568133Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2024-06-14T09:44:16.114092Z 0 [Warning] InnoDB: New log files created, LSN=45790
2024-06-14T09:44:16.202313Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2024-06-14T09:44:16.266020Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: aa1eef0d-2a32-11ef-8fba-00163e34f2ea.
2024-06-14T09:44:16.268284Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-06-14T09:44:16.919375Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2024-06-14T09:44:16.919395Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2024-06-14T09:44:16.919808Z 0 [Warning] CA certificate ca.pem is self signed.
2024-06-14T09:44:17.094159Z 1 [Note] A temporary password is generated for root@localhost: cl0pEPV5?3n(
# 启动MySQL服务
support-files/mysql.server start
cd bin/
./mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'112.97.87.100' IDENTIFIED BY '123456';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
alter user 'root'@'localhost' identified by '123456';
FLUSH PRIVILEGES;
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared o
yum install libaio
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
./mysql -u root -p