MySQL rpm 版本安装

 准备:

[[email protected] moudles]# ls
MySQL-client-5.6.36-1.linux_glibc2.5.x86_64.rpm  MySQL-server-5.6.36-1.linux_glibc2.5.x86_64.rpm

验证系统中是否安装mysql:

[[email protected] moudles]# rpm -qa|grep -i mysql
mysql-libs-5.1.71-1.el6.x86_64

本系统中自带mysql, 将其卸载:

[[email protected] moudles]# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64

 安装MySQL:

[[email protected] moudles]# rpm -ivh MySQL-server-5.6.36-1.linux_glibc2.5.x86_64.rpm
warning: MySQL-server-5.6.36-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [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
warning: group mysql does not exist - using root
2017-06-23 22:09:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-23 22:09:33 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-06-23 22:09:33 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 1656 ...
2017-06-23 22:09:33 1656 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-06-23 22:09:33 1656 [Note] InnoDB: The InnoDB memory heap is disabled
2017-06-23 22:09:33 1656 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-23 22:09:33 1656 [Note] InnoDB: Memory barrier is not used
2017-06-23 22:09:33 1656 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-06-23 22:09:33 1656 [Note] InnoDB: Using Linux native AIO
2017-06-23 22:09:33 1656 [Note] InnoDB: Using CPU crc32 instructions
2017-06-23 22:09:33 1656 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-06-23 22:09:33 1656 [Note] InnoDB: Completed initialization of buffer pool
2017-06-23 22:09:33 1656 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2017-06-23 22:09:33 1656 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2017-06-23 22:09:33 1656 [Note] InnoDB: Database physically writes the file full: wait...
2017-06-23 22:09:33 1656 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2017-06-23 22:09:33 1656 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2017-06-23 22:09:33 1656 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2017-06-23 22:09:33 1656 [Warning] InnoDB: New log files created, LSN=45781
2017-06-23 22:09:33 1656 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-06-23 22:09:33 1656 [Note] InnoDB: Doublewrite buffer created
2017-06-23 22:09:33 1656 [Note] InnoDB: 128 rollback segment(s) are active.
2017-06-23 22:09:33 1656 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-06-23 22:09:33 1656 [Note] InnoDB: Foreign key constraint system tables created
2017-06-23 22:09:33 1656 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-06-23 22:09:33 1656 [Note] InnoDB: Tablespace and datafile system tables created.
2017-06-23 22:09:33 1656 [Note] InnoDB: Waiting for purge to start
2017-06-23 22:09:33 1656 [Note] InnoDB: 5.6.36 started; log sequence number 0
A random root password has been set. You will find it in ‘/root/.mysql_secret‘.
2017-06-23 22:09:33 1656 [Note] Binlog end
2017-06-23 22:09:33 1656 [Note] InnoDB: FTS optimize thread exiting.
2017-06-23 22:09:33 1656 [Note] InnoDB: Starting shutdown...
2017-06-23 22:09:35 1656 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2017-06-23 22:09:35 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-23 22:09:35 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-06-23 22:09:35 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 1678 ...
2017-06-23 22:09:35 1678 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-06-23 22:09:35 1678 [Note] InnoDB: The InnoDB memory heap is disabled
2017-06-23 22:09:35 1678 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-23 22:09:35 1678 [Note] InnoDB: Memory barrier is not used
2017-06-23 22:09:35 1678 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-06-23 22:09:35 1678 [Note] InnoDB: Using Linux native AIO
2017-06-23 22:09:35 1678 [Note] InnoDB: Using CPU crc32 instructions
2017-06-23 22:09:35 1678 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-06-23 22:09:35 1678 [Note] InnoDB: Completed initialization of buffer pool
2017-06-23 22:09:35 1678 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-23 22:09:35 1678 [Note] InnoDB: 128 rollback segment(s) are active.
2017-06-23 22:09:35 1678 [Note] InnoDB: Waiting for purge to start
2017-06-23 22:09:35 1678 [Note] InnoDB: 5.6.36 started; log sequence number 1625977
2017-06-23 22:09:35 1678 [Note] Binlog end
2017-06-23 22:09:35 1678 [Note] InnoDB: FTS optimize thread exiting.
2017-06-23 22:09:35 1678 [Note] InnoDB: Starting shutdown...
2017-06-23 22:09:37 1678 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in ‘/root/.mysql_secret‘.

You must change that password on your first connect,
no other statement but ‘SET PASSWORD‘ will be accepted.
See the manual for the semantics of the ‘password expired‘ flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

随机给 root 用户创建了一个密码。

判断是否安装成功:

[[email protected] moudles]# ps -ef|grep mysql
root       1748   1534  0 22:22 pts/0    00:00:00 grep mysql

安装成功,但是没有启动。

查看用户是否创建成功:

[[email protected] home]# cat /etc/passwd|grep mysql    //查看用户数据库, 其中的域给出了用户名、加密口令和用户的其他信息
mysql:x:498:498:MySQL server:/var/lib/mysql:/bin/bash
[[email protected] home]# cat /etc/group|grep mysql   //查看本地相关的用户组信息
mysql:x:498:

查看安装版本:

[[email protected] home]# mysqladmin --version
mysqladmin  Ver 8.42 Distrib 5.6.36, for Linux on x86_64

启动mysql:

[[email protected] home]# service mysql start
Starting MySQL.Logging to ‘/var/lib/mysql/localhost.localdomain.err‘. [确定]

查看状态:

[[email protected] home]# ps -ef|grep mysql
root       1791      1  0 22:35 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
mysql      1886   1791  2 22:35 pts/0    00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/localhost.localdomain.err --pid-file=/var/lib/mysql/localhost.localdomain.pid
root       1914   1534  0 22:36 pts/0    00:00:00 grep mysql

关闭mysql:

[[email protected] home]# service mysql stop
Shutting down MySQL..                                      [确定]

mysql开机自启:

时间: 2024-07-31 17:28:37

MySQL rpm 版本安装的相关文章

centos 6.4 mysql rpm 离线安装【备忘】

离线状态下使用rpm的安装包进行mysql的安装,仅作备忘 准备工作: 官网下载mysql离线rpm安装包(这里就不演示了,拿现成的做演示) 卸载并清理之前mysql安装与卸载的残留 1.检测本机安装的MySQL并卸载 rpm -qa|grep -i mysql 其中那个noarch那个是源地址包,不安装也一样 2.如上图所示,说明系统中已经装有MySQL,将其卸载: [[email protected] ~]# yum remove mysql 然后再次执行第一步查看是否有安装的mysql存在

Mysql rpm包安装

1.下载 MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm  MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm  MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm这三个软件包,注意版本要一致: 2.安装三个RPM包,遇到冲突和依赖可以先删除相应的软件. rpm -ivh MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rp

MySql不同版本安装

1.win7 64位下如何安装配置mysql-5.7.4-m14-winx64  1. mysql-5.7.4-m14-winx64.zip下载 2.解压到D:/mysql.(路径自己指定) 3.在D:/mysql/mysql-5.7.4-m14-winx64下新建my.ini配置文件内容如下: ####################配置文件开始################### # For advice on how to change settings please see # ***

MySQL zip版本安装

1.  参考这个博客http://www.cnblogs.com/Michael1/p/5806384.html安装到第4步 1.Data和my.ini一开始是没有的,注意地址D:\\是双斜杠 2.  接着第6步,注意执行mysqld –initlialize这条命令时data目录必须是空的,也可以没有data这个目录,第一次执行是没有的.如果执行时,提示缺少msvcp120.dll等到jdk\jre\bin里找,复制出来放到system32目录下. 3.  参考这个http://blog.cs

apache+php+mysql最新版本安装

上一随笔简单介绍了通过安装AppServ一次性简洁安装apache,php,mysql的方法,但是安装的弊端就是虽然简单,但是不能单独进行软件的更新,导致不够方便,所以,现在我重新尝试单个软件安装,并配置. 1.首先还是推荐网上的非常好的一篇文章,相关链接如下:http://blog.csdn.net/lyrebing/article/details/8587054.如果你英文还可以的话,可以根据这篇文章的介绍,轻松的完成相关软件的下载.安装.配置.2.如果你英文不够好,那么我再用汉语简单描述一

mysql 57版本安装

1.下载tar包,这里使用wget从官网下载 wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz 2.将mysql安装到/usr/local/mysql下# 解压 tar -xvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz # 移动 mv mysql-5.7.22-linux-glibc2.12-x86_64 /usr

mysql rpm包安装后修改数据目录

1.停止mysql数据服务 /etc/init.d/mysqld stop 2.为创建的数据目录指定权限 chmod -R 777 /home/mysql/database/* chown -R mysql.mysql /home/mysql/database/* 3.将默认的数据目录的所有的东西全部拷贝到现在的目录(也可以在第二步之前完成) cp -r /var/lib/mysql/* /home/mysql/database/ 4.修改配置文件 vim /etc/my.cnf [mysql]

mysql generic版本安装配置

下载linux generic版本tar.gz文件,如:mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz 解压到目标目录,如: /test/mysql-5.7.18-linux-glibc2.5-x86_64 mkdir /test/mysql-5.7.18-linux-glibc2.5-x86_64/data cd /test/mysql-5.7.18-linux-glibc2.5-x86_64/bin ./mysqld --initialize --user

Windows zip版本安装MySQL

Windows --MySQL zip版本安装记录: step1. 官网download zip包:http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.10-winx64.zip step2. 解压包,path中增加E:\software\mysql-5.7.10\bin step3. 修改 my-default.ini文件:basedir = E:\software\mysql-5.7.10datadir = E:\software\mysq