linux下安装mysql(rpm⽂件安装)数据库包下载:
在GPL开原协议的社区开源版⾥边下载
我们⽤mysql community server⾥边的
其中workbench是客户端⼯具
MySQL Cluster是oracle⾃⼰搞的集版的(集成了⼀些开源⼯具和增值服务)
选择操作系统和版本
建议在linux下安装
也可以选择版本
下载server包和client包
如果是server包,那架构图⾥的东西都有了
还要下个client utilities包,客户端包,类似connection层
下载后⽤rz命令传到centos linux系统⾥边
rpm是包管理器
xshell可以直接拖
也可以⽤rz命令,没有的话安装⼀下: yum install lrzsz
yum是包资源管理器,可以解决包依赖的问题,把需要的包都下载下来
传到linux系统
安装mysql步骤:
清理环境
centos7会⾃带⼀个mariadb
查看是否已安装
rpm -qa |grep -i mysql
rpm -qa |grep -i mariadb(centos7默认系统⾃带的)
mariadb是从mysql来的,是它的⼀个分⽀,需要清理掉
清理掉mariadb包
⽤yum直接安装你的话,⽤的mariadb的yum源,它跟mysql官⽅正式版不太⼀样,我们要安装官⽅正式版,就需要清掉mariadb,然后⼿动安装⾃⼰下载的官⽅正式版mysql
rpm -e 加上包名,把mariadb包清掉
可以看到⽤rpm删除会失败,提⽰有依赖关系的软件需要安装
rpm -e mariadb-libs-5.5.56-2.el7.x86_64
rpm删除时如果有依赖关系,可以⽤yum remove + 包名来删除mariadb
开始安装:
⼀般⽤装软件⽤yum直接安装也可以,但是有⼀个问题:⽤yum的话,是到默认的mariadb⽤的yum源
去,可能会不到,所以我们⾃⼰来安装
rpm –ivh + 包安装所需要的包
rpm -ivh MySQL-client-5.6.42-1.el7.x86_64.rpm
rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
server安装成功后会输出⼀些信息,如下:
[root@localhost soft]# rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
warning: MySQL-server-5.6.42-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
< >>>>>>### [100%]
Updating /
1:MySQL-server-5.6.42-1.el7 >>>>>>### [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
warning: user mysql does not exist - using root
mysql下载下来没安装包warning: group mysql does not exist - using root
2018-11-18 13:53:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-18 13:53:24 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-18 13:53:24 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 6420 ...
2018-11-18 13:53:24 6420 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-18 13:53:24 6420 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-18 13:53:24 6420 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-18 13:53:24 6420 [Note] InnoDB: Memory barrier is not used
2018-11-18 13:53:24 6420 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-11-18 13:53:24 6420 [Note] InnoDB: Using Linux native AIO
2018-11-18 13:53:24 6420 [Note] InnoDB: Using CPU crc32 instructions
2018-11-18 13:53:24 6420 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-18 13:53:24 6420 [Note] InnoDB: Completed initialization of buffer pool
2018-11-18 13:53:24 6420 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2018-11-18 13:53:24 6420 [Note] InnoDB: Database physically writes the file full:
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-11-18 13:53:25 6420 [Warning] InnoDB: New log files created, LSN=45781
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer not found: creating new
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer created
2018-11-18 13:53:25 6420 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-18 13:53:25 6420 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Foreign key constraint system tables created
2018-11-18 13:53:25 6420 [Note] InnoDB: Creating tablespace and datafile system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Tablespace and datafile system tables created.
2018-11-18 13:53:25 6420 [Note] InnoDB: Waiting for purge to start
2018-11-18 13:53:25 6420 [Note] InnoDB: 5.6.42 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2018-11-18 13:53:26 6420 [Note] Binlog end
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
云服务器离线安装MariaDB安装步骤和解决办法
« 上一篇
发表评论