首页 > 数据库技术 > 详细

mysql编译好的简单安装

时间:2019-03-19 22:01:19      阅读:180      评论:0      收藏:0      [点我收藏+]
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; (修改密码)

 

mysql编译好的简单安装

原文:https://www.cnblogs.com/lijibing123456/p/10561648.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!