首先下载下面三个文件:

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. Android Drawable 那些不为人知的高效用法

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/43752383,本文出自:[张鸿洋的博客] 1.概述 Drawable在我们平时的 ...

  2. linux 系统内核空间与用户空间通信的实现与分析<转>

    linux 系统内核空间与用户空间通信的实现与分析 2 评论: 陈鑫 (chen.shin@hotmail.com), 自由软件爱好者, 南京邮电学院电子工程系 2004 年 7 月 01 日 内容 ...

  3. c++头文件 #include<iostream>

    cout<<"C1="<<setiosflags(ios::fixed)<<setprecision(2)<<3.14*r*2< ...

  4. 使用未付费的账号真机调试 iOS 程序,过几天后程序一打开就会闪退

    使用未付费的苹果开发者账号真机调试 iOS 程序,过几天后程序一打开就会闪退.   解决办法: 删除 Provisioning Profile,重新配置一次. 终极解决办法:花钱购买苹果开发者账号. ...

  5. 回发或回调参数无效。在配置中使用 pages enableEventValidation=true 或在页面中使用 %@ Page EnableEventValidation=true % 启用了事件验证

    WebForm中回发或回调参数无效问题的解决 解决 .NET中回发或回调参数无效问题的解 该错误的详细提示信息为: 回发或回调参数无效.在配置中使用 <pages enableEventVali ...

  6. 深入浏览器兼容 细数jQuery Hooks 属性篇

    关于钩子:http://www.cnblogs.com/aaronjs/p/3387906.html 本章的目的很简单,通过钩子函数更细节的了解浏览器差异与处理方案, 版本是2.0.3所以不兼容ie6 ...

  7. jQuery源码分析系列(34) : Ajax - 预处理jsonp

    上一章大概讲了前置过滤器和请求分发器的作用,这一章主要是具体分析每种对应的处理方式 $.ajax()调用不同类型的响应,被传递到成功处理函数之前,会经过不同种类的预处理(prefilters). 预处 ...

  8. unity开发相关环境(vs、MonoDevelop)windows平台编码问题

    情景描述:最近在做Unity的网络底层,用VS编写源码,MonoDevelop用来Debug,在Flash Builder上搭建的Python做协议生成器,期间有无数次Unity莫名奇妙的的down掉 ...

  9. 【转】oracle中in和exists的区别

    原文地址:http://blog.itpub.net/7478833/viewspace-441043/ 感谢作者   in 和 exists区别   in 是把外表和内表作hash join,而ex ...

  10. WPF MVVM框架下,VM界面写控件

    MVVM正常就是在View页面写样式,ViewModel页面写逻辑,但是有的时候纯在View页面写样式并不能满足需求.我最近的这个项目就遇到了,因此只能在VM页面去写样式控件,然后绑定到View页面. ...