热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

开发笔记:MySQLrpm版本安装

篇首语:本文由编程笔记#小编为大家整理,主要介绍了MySQL rpm 版本安装相关的知识,希望对你有一定的参考价值。  准备:[[email protected] moudles]

篇首语:本文由编程笔记#小编为大家整理,主要介绍了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开机自启:

 


推荐阅读
  • 本文介绍了在rhel5.5操作系统下搭建网关+LAMP+postfix+dhcp的步骤和配置方法。通过配置dhcp自动分配ip、实现外网访问公司网站、内网收发邮件、内网上网以及SNAT转换等功能。详细介绍了安装dhcp和配置相关文件的步骤,并提供了相关的命令和配置示例。 ... [详细]
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文介绍了在Mac上搭建php环境后无法使用localhost连接mysql的问题,并通过将localhost替换为127.0.0.1或本机IP解决了该问题。文章解释了localhost和127.0.0.1的区别,指出了使用socket方式连接导致连接失败的原因。此外,还提供了相关链接供读者深入了解。 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • PG12新增的VACUUM命令的SKIP_LOCKED选项
    PG12版本的VACUUM命令新增了SKIP_LOCKED选项,该选项使得vacuum命令在遇到被lock住的table时可以跳过并被视为成功执行。之前的版本中,vacuum命令会一直处于等待状态。本文还提到了PostgreSQL 12.1版本的相关信息。 ... [详细]
  • 通过Anaconda安装tensorflow,并安装运行spyder编译器的完整教程
    本文提供了一个完整的教程,介绍了如何通过Anaconda安装tensorflow,并安装运行spyder编译器。文章详细介绍了安装Anaconda、创建tensorflow环境、安装GPU版本tensorflow、安装和运行Spyder编译器以及安装OpenCV等步骤。该教程适用于Windows 8操作系统,并提供了相关的网址供参考。通过本教程,读者可以轻松地安装和配置tensorflow环境,以及运行spyder编译器进行开发。 ... [详细]
  • 如何使用PLEX播放组播、抓取信号源以及设置路由器
    本文介绍了如何使用PLEX播放组播、抓取信号源以及设置路由器。通过使用xTeve软件和M3U源,用户可以在PLEX上实现直播功能,并且可以自动匹配EPG信息和定时录制节目。同时,本文还提供了从华为itv盒子提取组播地址的方法以及如何在ASUS固件路由器上设置IPTV。在使用PLEX之前,建议先使用VLC测试是否可以正常播放UDPXY转发的iptv流。最后,本文还介绍了docker版xTeve的设置方法。 ... [详细]
  • Nginx使用AWStats日志分析的步骤及注意事项
    本文介绍了在Centos7操作系统上使用Nginx和AWStats进行日志分析的步骤和注意事项。通过AWStats可以统计网站的访问量、IP地址、操作系统、浏览器等信息,并提供精确到每月、每日、每小时的数据。在部署AWStats之前需要确认服务器上已经安装了Perl环境,并进行DNS解析。 ... [详细]
  • Skywalking系列博客1安装单机版 Skywalking的快速安装方法
    本文介绍了如何快速安装单机版的Skywalking,包括下载、环境需求和端口检查等步骤。同时提供了百度盘下载地址和查询端口是否被占用的命令。 ... [详细]
  • 学习SLAM的女生,很酷
    本文介绍了学习SLAM的女生的故事,她们选择SLAM作为研究方向,面临各种学习挑战,但坚持不懈,最终获得成功。文章鼓励未来想走科研道路的女生勇敢追求自己的梦想,同时提到了一位正在英国攻读硕士学位的女生与SLAM结缘的经历。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 本文介绍了在Windows环境下如何配置php+apache环境,包括下载php7和apache2.4、安装vc2015运行时环境、启动php7和apache2.4等步骤。希望对需要搭建php7环境的读者有一定的参考价值。摘要长度为169字。 ... [详细]
  • ALTERTABLE通过更改、添加、除去列和约束,或者通过启用或禁用约束和触发器来更改表的定义。语法ALTERTABLEtable{[ALTERCOLUMNcolu ... [详细]
  • 在Windows10系统上使用VMware创建CentOS虚拟机的详细步骤教程
    本文详细介绍了在Windows10系统上使用VMware创建CentOS虚拟机的步骤,包括准备条件、安装VMware、下载CentOS ISO文件、创建虚拟机并进行自定义配置、设置虚拟机的ISO与网络、进行安装和配置等。通过本文的指导,读者可以轻松地创建自己的CentOS虚拟机并进行相应的配置和操作。 ... [详细]
author-avatar
低调的小男2502928607
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有