redhat6.4安装MySQL-server-5.5.28-1.linux2.6.x86_64.rpm
首先下载下面三个文件:
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的更多相关文章
- ubuntu 14.04 安装mysql server初级教程
序,mysql数据库是开源的,被大多数企业所使用 目录 一.apt-get install 软件安装原理剖析二.安装mysql server三.配置和管理msyql 一.apt-get install ...
- CentOS 7 安装MySql Server 5.6
1. 安装MySql Server 在/etc/yum.repos.d/目录下添加以下文件mysql-community.repo文件,内容如下: [mysql56-community] name=M ...
- Centos 7 官网下载安装mysql server 5.6
Centos 7 官网下载安装 mysql server # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rp ...
- 安装MySQL Server
之前安装了MySQL Workbench 8.0 CE,现在来安装MySQL Server. 点击 add next next next 完成 MySQL安装包地址: 链接:https://p ...
- CentOS 7中如何安装mysql server
以前一直用RHEL 6.3和6.4,系统盘里自带了mysql server,配置好yum源后,直接yum install mysql-server就可安装mysql服务器端了,最近用CentOS 7. ...
- ubuntu 14.04 安装mysql server的分支MariaDB Server初级教程
序,MariaDB Server是Mysql的fork版本,与Mysql完美兼容,mysql在10年被sun收购,后sun被oracle收购,后mysql的创建者及项目长期技术带头人之一的Michae ...
- 数据库服务器的安装 (MySQL Server 5.7) :
MySQL 和 MariaDB 都是 Ubuntu 16.04 中的数据库服务器. MySQL Server 和 MariaDB Server的安装包都可以在Ubuntu 的默认软件源中找到,我们可以 ...
- Windows 7下安装MySQL Server卡在Apply Security Settings的解决方案(转)
如果操作无效,请卸载MySQL Server后换一个位置安装 例如默认的是C:\Program Files\MySQL 安装时选Custom修改到D:\Program Files\MySQL试试 == ...
- debian上安装mysql server
1 将mysql添加到apt的repository中 第一步,下载mysql提供的ppa文件 wget https://dev.mysql.com/get/mysql-apt-config_0.8.1 ...
随机推荐
- SikuliX简介及安装
一.简单介绍 SikuliIDE和Sikuli Script就是现在的SikuliX,最新版本是SikuliX1.1.0, 部分兼容Sikuli JAVA API,支持Python和Ruby,Siku ...
- [转]自己写PHP扩展之创建一个类
原文:http://www.imsiren.com/archives/572 比如我们要创建一个类..PHP代码如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
- java面试知识(来自牛客网)
接口和抽象类的区别是什么? 接口和抽象类的区别是什么? Java提供和支持创建抽象类和接口.它们的实现有共同点,不同点在于:接口中所有的方法隐含的都是抽象的.而抽象类则可以同时包含抽象和非抽象的方法. ...
- Python快速教程 尾声
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 写了将近两年的Python快速教程,终于大概成形.这一系列文章,包括Python基 ...
- Notes: DOM Range
通过DOM范围可以选择文档中的某个区域,而不需考虑节点的界限,例如文本高亮的处理就可以使用范围来实现. 1.Range的创建 使用document的createRange来创建一个范围,该方法返回一个 ...
- setTimeout与取号机之间的关系
说到setTimeout写过javascript的伙伴们一定不会陌生,去银行办过存取款业务的伙伴一定对取号机不会陌生.今天群里有个好伙伴在问setTimeout的问题,大伙你一言我一语,讲了很多,可是 ...
- publishing failed with multiple errors resource is out of sync with the file system--转
原文地址:http://blog.csdn.net/feng1603/article/details/7398266 今天用eclipse部署项目遇到"publishing failed w ...
- Ios 实现 滑动cell 伸缩的核心代码
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat viewHeight = scrollView.height + sc ...
- js ES6 对字符的操作注意事项
1.codePointAt方法是测试一个字符由两个字节还是由四个字节组成的最简单方法. function is32Bit(c) { return c.codePointAt(0) > 0xFFF ...
- Cesium应用篇:2影像服务(下)
文章中相关范例下载路径:https://yunpan.cn/cByQqkANWN7Pu 访问密码 823d 上篇主要介绍了Cesium自带的影像Provider ,在本篇中,我们主要涉及到如何扩展这些 ...