Linux系统版本:CentOS7.4 MySQL版本:5.7.28 在Linux平台有RPM包、二进制包、源码包3中安装方式,这一篇文章主要是以RPM包为例来介绍如何在Linux平台下进行MySQL的安装。 下载地址: https://cdn.bway.cn//Downloads/MySQL-5.7/mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz 具体安装步ERP系统,进销存系统,货代系统,日用品ERP系统骤如下: (1)首先卸载mariadb,不然后面会和安装mysql需要的库冲突:
[root@localhost ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.56-2.el7.x86_64
[root@localhost ~]# rpm -e –nodeps mariadb-libs-5.5.56-2.el7.x86_64 (2)用root用户登录系统,增加mysql用户和组,数据库安装在此用户下:
[root@localhost ~]# groupadd mysql
[root@localhost ~]# useradd -r -g mysql -s /bin/false mysql (3)准备数据目录 以/app/data为例,建议使用逻辑卷
[root@localhost ~]# mkdir -p /app/data
[root@localhost ~]# chown mysql.mysql /app/data/
[root@localhost ~]# chmod 750 /app/data
(4)准备二进制文件:
[root@localhost ~]# tar xvf mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
root@localhost ~]# cd /usr/local
[root@localhost local]# ln -sv mysql-5.7.28-linux-glibc2.12-x86_64 mysql
‘mysql’ -> ‘mysql-5.7.28-linux-glibc2.12-x86_64′ (5)初始化MySQL:
[root@localhost ~]# cd /usr/local/mysql
[root@localhost mysql]# bin/mysqld –initialize –user=mysql –basedir=/usr/local/mysql –datadir=/app/data
2019-11-03T09:47:18.263716Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2019-11-03T09:47:19.059462Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-11-03T09:47:19.140866Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-11-03T09:47:19.207569Z 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: ed1cd8ec-fe1e-11e9-8c9c-000c29f8617a.
2019-11-03T09:47:19.209181Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2019-11-03T09:47:19.646366Z 0 [Warning] CA certificate ca.pem is self signed.
2019-11-03T09:47:20.056792Z 1 [Note] A temporary password is generated for root@localhost: rY-6f??#! 本篇文章到此结束,如果您有相关技术方面疑问可以联系我们技术人员远程解决,感谢大家支持本站!
文章来源于网络,如有侵权,请联系删除。
我司专注于ERP软件开发,ERP生产管理软件,客户管理软件开发,进销存软件,
企业微信ERP生产管理软件,销售管理,生产管理,采购管理,客户管理,BOM物料管理,财务管理,统计分析于一体ERP管理软件,分手机APP ERP管理软件,企业微信ERP软件。多年来一直专于研发,销信于一体软件公司。