mysql 编译安装好处,mysql编译好的简单安装

1、创建mysql用户的账号

useradd mysql

2、下载mysql编译好的压缩包

3、安装mysql

yum -y install numactl libaio 安装依赖库

tar -zxvf mysql-5.7.25-linux-glibc2.12-x86_64.tar.gz 解压

mv mysql-5.7.25-linux-glibc2.12-x86_64 mysql 改名字

cd mysql 进去mysql

cd bin 进去bin文件夹

/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize 初始化mysql配置文件

2019-03-19T21:22:39.438405Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-03-19T21:22:39.780072Z 0 [Warning] InnoDB: New log files created, LSN=45790

2019-03-19T21:22:39.834292Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2019-03-19T21:22:39.904779Z 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: 1ffd47ce-4a8d-11e9-bb5c-000c29438466.

2019-03-19T21:22:39.909436Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2019-03-19T21:22:39.910139Z 1 [Note] A temporary password is generated for root@localhost: UUo2qa87)ncW

记住最后面初始化密码:UUo2qa87)ncW

安全启动:

./mysqld_safe --user=mysql & (要在mysql安装目录下的bin文件夹目录下)

[root@1111 bin]# Logging to '/usr/local/mysql/data/1111.err'.

2019-03-19T21:22:58.875454Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

停留是正常的,这是启动成功了。

ln -s /usr/local/mysql/bin/mysql /usr/bin 创建链接

4、改密码:

mysql> ALTER USER USER() IDENTIFIED BY 'root123'; (修改密码)

标签:bin,03,22,19T21,编译,2019,mysql,安装

来源: https://www.cnblogs.com/lijibing123456/p/10561648.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值