centos 6使用rpm安装mysql 5.6
来源:互联网 发布:淘宝店铺转让 淘铺王 编辑:程序博客网 时间:2024/05/29 09:16
1:查看os版本
cat /etc/issue
[root@localhost local]# cat /etc/issue
Oracle Linux Server release 6.7
Kernel \r on an \m
2:查看内核
[root@localhost local]# uname -a
Linux localhost.localdomain 3.8.13-68.3.4.el6uek.x86_64 #2 SMP Tue Jul 14 15:03:36 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
3:创建目录。上传包
[root@localhost software]# ls
MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar
[root@localhost software]# pwd
/home/software
4:解压包
[root@localhost software]# tar -xvf MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar
MySQL-test-5.6.35-1.el6.x86_64.rpm
MySQL-embedded-5.6.35-1.el6.x86_64.rpm
MySQL-devel-5.6.35-1.el6.x86_64.rpm
MySQL-shared-5.6.35-1.el6.x86_64.rpm
MySQL-client-5.6.35-1.el6.x86_64.rpm
MySQL-shared-compat-5.6.35-1.el6.x86_64.rpm
MySQL-server-5.6.35-1.el6.x86_64.rpm
5:删除系统自带的mysql包
[root@localhost software]# rpm -qa | grep mysql
mysql-libs-5.1.73-5.el6_6.x86_64
[root@localhost software]# yum -y remove mysql-libs-5.1*
Complete!
[root@localhost software]# rpm -qa | grep mysql
[root@localhost software]#
6:安装mysql
[root@localhost software]# rpm -ivh MySQL-server-5.6.35-1.el6.x86_64.rpm
warning: MySQL-server-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
[root@localhost software]# rpm -ivh MySQL-client-5.6.35-1.el6.x86_64.rpm
warning: MySQL-client-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@localhost software]# rpm -ivh MySQL-devel-5.6.35-1.el6.x86_64.rpm
warning: MySQL-devel-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
6:修改参数文件
[root@localhost software]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf
7:初始化mysql
[root@localhost software]# /usr/bin/mysql_install_db
8:强制使用root启动mysql(如果不使用强制启动会报错)
[root@localhost bin]# /usr/sbin/mysqld --user=root &
[root@localhost ~]# ps -ef | grep mysql
root 9750 9384 0 14:04 pts/1 00:00:00 /usr/sbin/mysqld --user=root
root 9797 9772 0 14:06 pts/2 00:00:00 grep mysql
[root@localhost ~]# netstat -anpt | grep 3306
tcp 0 0 :::3306 :::* LISTEN 9750/mysqld
9:查看root的初始密码和重新设置密码
[root@localhost ~]# more /root/.mysql_secret
# The random password set for the root user at Tue Sep 5 13:53:46 2017 (local time): 8oa2yTSLQ9QZpUtg
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.35
Copyright (c) 2000, 2016, 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.
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@localhost ~]#
10:验证密码
[root@localhost ~]# mysql -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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.
mysql>
cat /etc/issue
[root@localhost local]# cat /etc/issue
Oracle Linux Server release 6.7
Kernel \r on an \m
2:查看内核
[root@localhost local]# uname -a
Linux localhost.localdomain 3.8.13-68.3.4.el6uek.x86_64 #2 SMP Tue Jul 14 15:03:36 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
3:创建目录。上传包
[root@localhost software]# ls
MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar
[root@localhost software]# pwd
/home/software
4:解压包
[root@localhost software]# tar -xvf MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar
MySQL-test-5.6.35-1.el6.x86_64.rpm
MySQL-embedded-5.6.35-1.el6.x86_64.rpm
MySQL-devel-5.6.35-1.el6.x86_64.rpm
MySQL-shared-5.6.35-1.el6.x86_64.rpm
MySQL-client-5.6.35-1.el6.x86_64.rpm
MySQL-shared-compat-5.6.35-1.el6.x86_64.rpm
MySQL-server-5.6.35-1.el6.x86_64.rpm
5:删除系统自带的mysql包
[root@localhost software]# rpm -qa | grep mysql
mysql-libs-5.1.73-5.el6_6.x86_64
[root@localhost software]# yum -y remove mysql-libs-5.1*
Complete!
[root@localhost software]# rpm -qa | grep mysql
[root@localhost software]#
6:安装mysql
[root@localhost software]# rpm -ivh MySQL-server-5.6.35-1.el6.x86_64.rpm
warning: MySQL-server-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
[root@localhost software]# rpm -ivh MySQL-client-5.6.35-1.el6.x86_64.rpm
warning: MySQL-client-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
[root@localhost software]# rpm -ivh MySQL-devel-5.6.35-1.el6.x86_64.rpm
warning: MySQL-devel-5.6.35-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
6:修改参数文件
[root@localhost software]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf
7:初始化mysql
[root@localhost software]# /usr/bin/mysql_install_db
8:强制使用root启动mysql(如果不使用强制启动会报错)
[root@localhost bin]# /usr/sbin/mysqld --user=root &
[root@localhost ~]# ps -ef | grep mysql
root 9750 9384 0 14:04 pts/1 00:00:00 /usr/sbin/mysqld --user=root
root 9797 9772 0 14:06 pts/2 00:00:00 grep mysql
[root@localhost ~]# netstat -anpt | grep 3306
tcp 0 0 :::3306 :::* LISTEN 9750/mysqld
9:查看root的初始密码和重新设置密码
[root@localhost ~]# more /root/.mysql_secret
# The random password set for the root user at Tue Sep 5 13:53:46 2017 (local time): 8oa2yTSLQ9QZpUtg
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.35
Copyright (c) 2000, 2016, 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.
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@localhost ~]#
10:验证密码
[root@localhost ~]# mysql -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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.
mysql>
阅读全文
2 0
- centos 6使用rpm安装mysql 5.6
- centos使用rpm安装mysql
- CentOS RPM安装MySQL-5.6
- CentOS RPM安装MySQL-5.6
- CentOS RPM 安装 mysql-5.6
- centos系统使用RPM 安装mysql数据库
- Linux Centos 6 rpm 安装Mysql-5.6.25
- CentOS 6使用rpm方式安装JDK8
- CentOS 6使用rpm方式安装JDK8
- centos rpm方式安装mysql
- CentOS 7.1 rpm安装 MySQL
- centos rpm方式安装mysql
- 在CentOs 5.1中使用rpm安装NGINX+php+mysql
- 在CentOs 5.1中使用rpm安装NGINX+php+mysql
- centos下安装mysql,使用rpm包的形式
- 在CentOS 6.5 上安装Mysql 5.6,采用rpm安装
- linux centos(5.6)使用rpm方式安装mysql(5.5)时候报错:error:failed dependencies
- CentOS安装MySQL-server-5.6.13-1.el6.x86_64.rpm
- swift权限符
- spring为ApplicationContext提供有三种实现
- 自定义注解
- maven项目显示缺少jdk1.6 tools.jar解决方案
- Linux 注册自定tftpd服务(改进)
- centos 6使用rpm安装mysql 5.6
- emqtt中auth-mysql插件与emqtt服务器连接的配置
- 人机交互成就感的及时反馈
- 数据库优化
- pip下载安装
- Spring框架(3.0)下的定时任务
- 在HLS的IP核中声明默认逻辑引脚
- weblogic 12 开启debug端口配置
- spark+mongodb大数据框架搭建