1、下载Mysql安装所需的rpm包

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.linux_glibc2.5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm

2、安装

[root@Luxh-01 softs]# rpm -ivh MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm 
[root@Luxh-01 softs]# rpm -ivh MySQL-client-5.6.21-1.linux_glibc2.5.x86_64.rpm
[root@Luxh-01 softs]# rpm -ivh MySQL-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm

  安装过程中,Mysql会成一个随机密码给root用户,密码存储在 /root/.mysql_secret

  MySQL安装目录信息:

Directory Contents of Directory
/usr/bin Client programs and scripts
/usr/sbin The mysqld server
/var/lib/mysql Log files, databases
/usr/share/info Manual in Info format
/usr/share/man Unix manual pages
/usr/include/mysql Include (header) files
/usr/lib/mysql Libraries
/usr/share/mysql Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation
/usr/share/sql-bench Benchmarks

3、启动MySQL:

[root@Luxh-01 ~]# service mysql start
Starting MySQL... [确定]
[root@Luxh-01 ~]# service mysql status
MySQL running (3270) [确定]

4、登录MySQL

[root@Luxh-01 ~]# mysql -uroot -p

  输入安装时生成的随机密码即可登入到MySQL的命令行界面

5、修改root用户密码

mysql> set password = password('');

6、复制/usr/share/mysql/my-default.cnf 到/etc/my.cnf

[root@Luxh-01 mysql]# pwd
/usr/share/mysql
[root@Luxh-01 mysql]# cp my-default.cnf /etc/my.cnf
[root@Luxh-01 mysql]#

  然后根据实际需要可以修改/etc/my.cnf,修改后重启mysql即可

7、允许root远程登录

mysql> grant all on *.* to root@'%' identified by "";
Query OK, rows affected (0.02 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec) mysql>

  

rpm包形式安装MySQL的更多相关文章

  1. CentOS 6.5 RPM包方式安装 Mysql 5.6

    1. 下载MySQL 5.6 下载页面:http://dev.mysql.com/downloads/mysql/此处选择“Red Hat Enterprise Linux 6 / Oracle Li ...

  2. MySQL在linux上的rpm包方式安装方法

    1.下载上传mysql server和client rpm包: [root@faspdev mnt]# ls MySQL-client-5.5.53-1.el6.x86_64.rpm MySQL-se ...

  3. 【转载】linux-查询rpm包相关安装、卸载脚本

        测试过程中,有时要测试开发自己打的rpm包,为了确认打包正确,需要查询rpm包相关安装.卸载脚本,可以使用命令:   [root@6 /]#rpm -q --scripts mysql pos ...

  4. 安装 RPM 包或者安装源码包

    安装 RPM 包或者安装源码包 在windows下安装一个软件很轻松,只要双击.exe的文件,安装提示连续“下一步”即可,然而linux系统下安装一个软件似乎并不那么轻松了,因为我们不是在图形界面下. ...

  5. 插入光盘,创建挂载点,挂载设备,安装rpm包,升级rpm包,卸载rpm包,查询rpm包是否安装,查询rpm包信息、安装位置,查询系统文件名属于哪个安装包

    插入光盘: 创建挂载点: 创建挂载点. 挂载设备:或者mount /dev/sr0 /mnt/cdrom 安装rpm包: [root@localhost Packages]# rpm -ivh mys ...

  6. linux的基本操作(RPM包或者安装源码包)

    RPM包或者安装源码包 在windows下安装一个软件很轻松,只要双击.exe的文件,安装提示连续“下一步”即可,然而linux系统下安装一个软件似乎并不那么轻松了,因为我们不是在图形界面下.所以你要 ...

  7. rpm包的安装,查询,卸载,升级,校验,数据库重建,验证数据包

    rpm命名: 包:组成部分 主包:bind-9.7.1-1.i586.e15.rpm 子包:bind-lib-9.7.1-1.i586.e15.rpm bind-utils-9.7.1-1.i586. ...

  8. CentOS 7.2使用源码包编译安装MySQL 5.7.22及一些操作

    CentOS 7.2使用源码包编译安装MySQL 5.7.22及一些操作 2018年07月05日 00:28:38 String峰峰 阅读数:2614   使用yum安装的MySQL一般版本比较旧,但 ...

  9. 安装RPM包或者安装源代码包

    第十一章 安装RPM包或者安装源代码包 在windows下安装一个软件非常轻松,仅仅要双击.exe的文件,安装提示连续"下一步"就可以,然而linux系统下安装一个软件似乎并不那么 ...

随机推荐

  1. redhat6.4上用apache建立os repos

    1.挂载OS介质文件 [root@server- Packages]# mkdir -p /media/dvd [root@server- Packages]# -20130130.0-Server- ...

  2. powershell脚本闪电输入神器

    如图所示: 用autohotkey,把下列常用按键互唤.来达到快速输入目的.并且只对powershell ise,power gui,visual studio code,powershell stu ...

  3. easyui js基础

    $(document).ready( function(){ initload(); });function initConfig(){ //数据列表 yzfymx=$("#tjdj&quo ...

  4. HM NIS Edit 2.0.3 Win32 Error. Code:740.请求的操作需要提升

    使用NSIS安装向导,生成脚本后,按F9后,居然提示:HM NIS Edit 2.0.3 Win32 Error. Code:740.请求的操作需要提升 一开始就出错了,还真不顺. 在网上搜索了一下, ...

  5. Ubuntu Command-Line: Enable Unlimited Scrolling in the Terminal

    At times when using the terminal, the output from a command can be so long, you simply can’t scroll ...

  6. SqlServer性能优化:创建性能监视器(二)

    添加三个选项: 下一步就可以了 Sql跟踪的模板: 跟踪Sql 语句的执行情况: 使用刚才的新建的模板: 用到的Sql语句: select * from [Sales].[SalesOrderDeta ...

  7. Oracle 11gR2 安装教学

    官方网址:http://www.oracle.com/index.html 选择你的"操作系统"下载 例如: 环境:x64 Win2012 R2 Oracle:win64_11gR ...

  8. Android FM模块学习之四源码分析(3)

    接着看FM模块的其他几个次要的类的源码.这样来看FM上层的东西不是太多. 请看android\vendor\qcom\opensource\fm\fmapp2\src\com\caf\fmradio\ ...

  9. 【转载】张逸--ThoughtWorks(中国)程序员读书雷达

    原文地址:ThoughtWorks(中国)程序员读书雷达 软件业的特点是变化.若要提高软件开发的技能,就必须跟上技术发展的步伐.埋首醉心于项目开发与实战,固然能够锤炼自己的开发技巧,却难免受限于经验与 ...

  10. Understanding Linux /proc/cpuinfo

    http://www.richweb.com/cpu_info A hyperthreaded processor has the same number of function units as a ...