首先下载下面三个文件:

MySQL-server-5.5.28-1.linux2.6.x86_64.rpm

MySQL-client-5.5.28-1.linux2.6.x86_64.rpm

MySQL-devel-5.5.28-1.linux2.6.x86_64.rpm

然后使用root账号登陆,进行安装:

1. 安装server、devel、client:1. 安装server、devel、client:

rpm -ivh --replacefiles MySQL-s*.rpm

rpm -ivh --replacefiles MySQL-d*.rpm

rpm -ivh --replacefiles MySQL-c*.rpm

[root@localhost ~]# rpm -ivh --replacefiles MySQL-server-5.5.28-1.linux2.6.x86_64.rpm

Preparing...                ########################################### [100%]

1:MySQL-server           ########################################### [100%]

[root@localhost ~]# rpm -ivh --replacefiles MySQL-client-5.5.28-1.linux2.6.x86_64.rpm

Preparing...                ########################################### [100%]

1:MySQL-client           ########################################### [100%]

[root@localhost ~]# rpm -ivh --replacefiles MySQL-devel-5.5.28-1.linux2.6.x86_64.rpm

Preparing...                ########################################### [100%]

1:MySQL-devel            ########################################### [100%]

要移除安装可以使用 rpm -e MySQL-server  、 rpm -e MySQL-devel、MySQL-client即可;

2. 初始化数据库:

/usr/bin/mysql_install_db

3. 启动mysql服务:

service mysql start

使用命令ps -ef | grep mysql 查看mysql进程:

[root@localhost ~]#  ps -ef|grep mysql root       3708   3057  0 18:39 pts/1    00:00:00 grep mysql

4.第一次登陆设置root密码:

首先查看 cat /root/.mysql_secret //有时候找不到那就先不管 往下看

root@localhost ~]# cat /root/.mysql_secret

# The random password set for the root user at Fri Aug 30 15:57:18 2013 (local time): fMYcarvB   这部网上说这样反正我没成功

然后命令行:mysql -u root -p ,然后输入上面的密码即可:

[root@localhost ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.28 MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

设置root密码:

mysql> use mysql

Database changed

mysql> update user set password=password('root') where user='root';

Query OK, 0 rows affected (0.15 sec)

Rows matched: 5  Changed: 0  Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

退出,重新登陆即可使用新的密码登陆;

5. 设置远程登陆:

使用root登陆到mysql后

切换到mysql数据库

mysql> show databases; +--------------------+ | Database           | +--------------------+ | information_schema | | mysql              | | performance_schema | | test               | +--------------------+ 4 rows in set (0.00 sec)

mysql> update user set host='%' where user='root'; ERROR 1046 (3D000): No database selected mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed mysql> update user set host='%' where user='root'; ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY' mysql> select host,user from user; +-----------------------+------+ | host                  | user | +-----------------------+------+ | %                     | root | | 127.0.0.1             | root | | ::1                   | root | | localhost             |      | | localhost.localdomain |      | | localhost.localdomain | root | +-----------------------+------+ 6 rows in set (0.00 sec)

然后:

mysql> grant all privileges on *.* to 'root'@'@' with grant option; ERROR 1105 (HY000): Malformed hostname (illegal symbol: '@') mysql> grant all privileges on *.* to 'root'@'%' with grant option; Query OK, 0 rows affected (0.00 sec)

mysql> exit

Bye

[root@localhost ~]# service mysql restart

Shutting down MySQL.. SUCCESS!

Starting MySQL.. SUCCESS!

重启mysql即可远程登陆。

redhat6.4安装MySQL-server-5.5.28-1.linux2.6.x86_64.rpm的更多相关文章

  1. ubuntu 14.04 安装mysql server初级教程

    序,mysql数据库是开源的,被大多数企业所使用 目录 一.apt-get install 软件安装原理剖析二.安装mysql server三.配置和管理msyql 一.apt-get install ...

  2. CentOS 7 安装MySql Server 5.6

    1. 安装MySql Server 在/etc/yum.repos.d/目录下添加以下文件mysql-community.repo文件,内容如下: [mysql56-community] name=M ...

  3. Centos 7 官网下载安装mysql server 5.6

    Centos 7 官网下载安装 mysql server # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rp ...

  4. 安装MySQL Server

    之前安装了MySQL Workbench 8.0 CE,现在来安装MySQL Server. 点击 add next next next     完成 MySQL安装包地址: 链接:https://p ...

  5. CentOS 7中如何安装mysql server

    以前一直用RHEL 6.3和6.4,系统盘里自带了mysql server,配置好yum源后,直接yum install mysql-server就可安装mysql服务器端了,最近用CentOS 7. ...

  6. ubuntu 14.04 安装mysql server的分支MariaDB Server初级教程

    序,MariaDB Server是Mysql的fork版本,与Mysql完美兼容,mysql在10年被sun收购,后sun被oracle收购,后mysql的创建者及项目长期技术带头人之一的Michae ...

  7. 数据库服务器的安装 (MySQL Server 5.7) :

    MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器. MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu 的默认软件源中找到,我们可以 ...

  8. Windows 7下安装MySQL Server卡在Apply Security Settings的解决方案(转)

    如果操作无效,请卸载MySQL Server后换一个位置安装 例如默认的是C:\Program Files\MySQL 安装时选Custom修改到D:\Program Files\MySQL试试 == ...

  9. debian上安装mysql server

    1 将mysql添加到apt的repository中 第一步,下载mysql提供的ppa文件 wget https://dev.mysql.com/get/mysql-apt-config_0.8.1 ...

随机推荐

  1. G2 2.0 更灵活、更强大、更完备的可视化引擎!

    概述 G2作为一款技术产品,自诞生以来,服务于广大的Web工程师群体和一部分数据分析师.一直来,G2 因其易用的语法和扎实的可视化理论基础,广受使用者好评.G2 1.x 的可视化能力已经非常强大,使用 ...

  2. selenium结合最新版的sikuli使用

    sikuli安装,下载sikulixsetup-1.1.0.jar,地址:https://launchpad.net/sikuli/sikulix/1.1.0 在装有Java环境的机器上直接双击jar ...

  3. html5多出来的字自动隐藏并显示...

  4. 连接第二个 insance 到 first_local_net - 每天5分钟玩转 OpenStack(83)

    上一节在 first_local_net 中已经部署了 cirros-vm1,今天将再部署一个instance,并验证两个 instance 的连通性. 以同样的方式 launch instance ...

  5. canvas的用法介绍

    目录 概述 绘图方法 图像处理方法 drawImage方法 getImageData方法,putImageData方法 toDataURL方法 save方法,restore方法 动画 像素处理 灰度效 ...

  6. nodejs与javascript中的aes加密

    简介 1.aes加密简单来说,在密码学中又称Rijndael加密法,是美国联邦政府采用的一种区块加密标准.这个标准用来替代原先的DES,已经被多方分析且广为全世界所使用.高级加密标准已然成为对称密钥加 ...

  7. C++ 使用 opencv 库时 Point 在已经引入了 core.hpp 的情况下仍无法识别的可能原因

    引入了 core.hpp 是不够的.请加上 using namespace cv;

  8. JavaScript中Promises/A+规范的实现

    Promises是一种异步编程模型,通过一组API来规范化异步操作,这样也能够让异步操作的流程控制更加容易. 下面的代码是假设执行一个异步队列,每一项都会使用上一项返回的数据: function ne ...

  9. hibernate笔记--实体类映射文件"*.hbm.xml"详解

    实体类就是指普通的POJO,Hibernate并不知道那个实体类对应数据库的哪一张表,所以还需要配置一下,常用的方式就是*.hbm.xml文件[配置与@注解配置,这里介绍前者的详细属性: <?x ...

  10. 求一个数组的最大子数组(C/C++实现)

    最大子数组:要求相连,加起来的和最大的子数组就是一个数组的最大子数组.编译环境:VS2012,顺便说句其实我是C#程序员,我只是喜欢学C++. 其实这是个半成品,还有些BUG在里面,不过总体的思路是这 ...