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 ...
随机推荐
- Windows组件:打开MSDTC,恢复Windows TaskBar,查看windows日志,打开Remote Desktop,打开Services,资源监控
一,Win10 打开 MSDTC 1,Win+R 打开运行窗口,输入 dcomcnfg,打开组件服务窗口 2,在组件服务 catalog下找到 Distributed Transaction Coor ...
- SSIS 参数的值
一,SSIS Parameter Value 的type 一个Parameter的Value共有三种类型,分别是Design Value,Server Value,Execution Value. D ...
- 吐槽:基于PhoneGap开发移动项目
目前,随着Google的Android手机和苹果的iphone手机的逐渐普及,越来越多开发者加入到移动应用开发的大军当中.其中,Android应用是基于Java语言基础上进行开发的,而苹果公司的iph ...
- XSD文件生成C#VO实体类
最近公司要做一个项目,需要和现有的其他项目对接,由于不知道他们的数据库,只有XSD文件.所以,我们在修改相应的程序时,就需要根据他们提供的XSD文件,来写我们的VO实体类,由于我写过根据Oracle数 ...
- 部署 instance 到 VXLAN - 每天5分钟玩转 OpenStack(112)
上一节我们创建了 vxlan 100_net,今天将部署 instance 并分析网络的连通性. launch 新的 instance "cirros-vm1",网络选择 vxla ...
- android5.0联系人 sort_key改成phonebook_label
项目中用到了联系人根据字母排序,在android4.0手机上是可以的,但是在android4.4以上的手机排序是乱的,一般字母排序都是根据sort_key这个拼音进行排序,而android5.0这个字 ...
- Jquery通过Ajax方式来提交Form表单
今天刚好看到Jquery的ajax提交数据到服务器的方法,原文是: 保存数据到服务器,成功时显示信息. jQuery 代码: $.ajax({ type: "POST", url: ...
- MySQL复合分区
到底还是开源软件,MySQL对复合分区的支持远远没有Oracle丰富. 在MySQL 5.6版本中,只支持RANGE和LIST的子分区,且子分区的类型只能为HASH和KEY. 譬如: CREATE T ...
- jdk8中java.util.concurrent包分析
并发框架分类 1. Executor相关类 Interfaces. Executor is a simple standardized interface for defining custom th ...
- 深入seajs源码系列一
简述 前端开发模块化已经是大势所趋,目前模块化的规范有很多,众所周知的有commonJS,Module/Wrappings和AMD等,而且ES6也着手开始制定模块化机制的实现.类似于c/c++的inc ...