临时服务器mysql的初始化

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

在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值