RedHat 6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm
首先下载下面三个文件:
MySQL-client-5.6.13-1.el6.x86_64.rpm
MySQL-devel-5.6.13-1.el6.x86_64.rpm
MySQL-server-5.6.13-1.el6.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 download]# rpm -ivh --replacefiles MySQL-server-5.6.13-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
[root@localhost download]# rpm -ivh --replacefiles MySQL-client-5.6.13-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@localhost download]# rpm -ivh --replacefiles MySQL-devel-5.6.13-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
要移除安装可以使用 rpm -e MySQL-server 、 rpm -e MySQL-devel、MySQL-client即可;
2. 初始化数据库:
[root@localhost download]# /usr/bin/mysql_install_db
3. 启动mysql服务:
[root@localhost download]# service mysql start
使用命令ps -ef | grep mysql 查看mysql进程:
[root@localhost ~]# ps -ef | grep mysql
root 26047 1 0 18:14 pts/12 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
mysql 26227 26047 0 18:14 pts/12 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/localhost.localdomain.pid --socket=/var/lib/mysql/mysql.sock
root 26545 24726 0 18:27 pts/8 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 ,然后输入上面的密码(即fMYcarvB)即可:
[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, 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.
设置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> 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 |
| 192.168.128.142 | root |
| ::1 | root |
| localhost.localdomain | root |
+-----------------------+------+
5 rows in set (0.00 sec) 然后: mysql> grant all privileges on *.* to 'root'@'%' with grant option;
Query OK, 0 rows affected (0.08 sec) mysql> exit
Bye
[root@localhost ~]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!
重启mysql即可远程登陆。
RedHat 6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm的更多相关文章
- 安装mysql警告 warning: mysql-community-server-5.7.19-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
摘自:https://www.cnblogs.com/royfans/p/7243641.html 红帽安装rpm安装MySQL时爆出警告: 警告:MySQL-server-5.5.46-1.linu ...
- 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中php 在连接mysql的时候,出现Can't connect to MySQL server on 'XXX' (13)
原文连接:http://hi.baidu.com/zwfec/item/64ef5ed9bf1cb3feca0c397c 红色的是命令 SQLSTATE[HY000] [2003] Can't con ...
- SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13)
SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13) 我可以真见识了 SELinux 的利害了, 这个问题让我找了好长时 ...
- redhat6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm
redhat6.3安装MySQL-server-5.6.13-1.el6.x86_64.rpm 首先下载下面三个文件: [plain] MySQL-client-5.6.13-1.el6.x ...
- CentOS 7中如何安装mysql server
以前一直用RHEL 6.3和6.4,系统盘里自带了mysql server,配置好yum源后,直接yum install mysql-server就可安装mysql服务器端了,最近用CentOS 7. ...
随机推荐
- [转]css3自适应布局单位vw,vh你知道多少?
原文地址:https://www.cnblogs.com/luxiaoxing/p/7544375.html 视口单位(Viewport units) 什么是视口? 在PC端,视口指的是在PC端,指的 ...
- js写入和读取cookie
<!doctype html> <html> <head> <meta http-equiv="Content-Type" content ...
- Leetcode: Split BST
Given a Binary Search Tree (BST) with root node root, and a target value V, split the tree into two ...
- ISO/IEC 9899:2011 条款6.10.2——源文件包含
6.10.2 源文件包含 约束 1.一个#include指示符应该指定一个能被实现处理的头文件或源文件. 语义 2.一个预处理指示符如下形式 # include <h-char-se ...
- jdbc如何处理事务
Connection提供了事务处理的方法,通过调用setAutoCommit(false)可以设置手动提交事务:当事务完成后用commit()显式提交事务:如果在事务处理过程中发生异常则通过rollb ...
- Spring cloud微服务安全实战-6-10sentinel之热点和系统规则
热点规则 热点就是经常访问的数据.很多时候我们希望争对某一些热点数据,然后来进行限制.比如说商品的信息这个服务,我们给它做一个限流,qps是100,某一天我想做一个秒杀活动,可能会有很大的流量,这个时 ...
- oracle plsql 异常
set serveroutput on DECLARE pename emp.ename%type; begin '; exception when no_data_found then dbms ...
- JAVA克隆对象报错:The method clone() from the type Object is not visible
将一个对象复制一份,称为对象的克隆技术.在Object类汇总存在一个clone()方法:protected Onject clone() throws CloneNotSupportedExcepti ...
- [转帖]Socat 入门教程
https://www.hi-linux.com/posts/61543.html 现在安装k8s 必须带 socat 今天看一下socat 到底是啥东西呢. Socat 是 Linux 下的一个多功 ...
- 【转帖】处理器史话 | 当Power架构的发展之路遭遇“滑铁卢”
处理器史话 | 当Power架构的发展之路遭遇“滑铁卢” https://www.eefocus.com/mcu-dsp/366740 (8)Power8:决定了 Power 平台的未来发展 2014 ...