日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

centos mysql5.6.35_centos_mysql5.6.35_rpm安装

發布時間:2025/3/15 数据库 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos mysql5.6.35_centos_mysql5.6.35_rpm安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.查看操作系統相關信息。

[root@linuxidc ~]# cat /etc/issue

CentOS release 6.5 (Final)

Kernel \r on an \m

[root@linuxidc ~]# uname -a

Linux linuxidc 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

2.創建需要下載rpm軟件包的目錄。

[root@linuxidc ~]# mkdir -p /taokey/tools

3.查看下是否有系統自帶mysql的rpm包,如果有,需要刪除自帶的舊rpm包。

[root@linuxidc ~]# rpm -qa | grep mysql

mysql-libs-5.1.71-1.el6.x86_64

[root@linuxidc ~]# yum -y remove mysql-libs-5.1*

[root@linuxidc ~]# rpm -qa | grep mysql

[root@linuxidc ~]#

4.在MySQL官網下載安裝MySQL-5.6.21所需的rpm軟件包。

需要下載三個rpm軟件包:

MySQL-client-5.6.21-1.rhel5.x86_64.rpm

MySQL-devel-5.6.21-1.rhel5.x86_64.rpm

MySQL-server-5.6.21-1.rhel5.x86_64.rpm

[root@linuxidc ~]# cd /taokey/tools/

[root@linuxidc tools]# wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-devel-5.6.35-1.linux_glibc2.5.i386.rpm

[root@linuxidc tools]# wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm

[root@linuxidc tools]# wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm

5.下載完之后,安裝三個rpm軟件包。

[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm

warning: MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

error: Failed dependencies:

libaio.so.1 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libgcc_s.so.1 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libgcc_s.so.1(GCC_3.0) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libgcc_s.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libstdc++.so.6 is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.35-1.linux_glibc2.5.i386

安裝MySQL-server報錯,原因是沒有安裝libaio.so.1,libgcc_s.so.1,libstdc++.so.6,yum安裝一下

[root@linuxidc tools]# yum -y install perl

[root@linuxidc tools]# yum install -y libaio.so.1

[root@linuxidc tools]# yum install -y libgcc_s.so.1

[root@linuxidc tools]# yum install -y libstdc++.so.6

[root@linuxidc tools]# rpm -ivh MySQL-server-5.6.35-1.linux_glibc2.5.i386.rpm

[root@linuxidc tools]# rpm -ivh MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm

warning: MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

error: Failed dependencies:

libncurses.so.5 is needed by MySQL-client-5.6.35-1.linux_glibc2.5.i386

[root@linuxidc tools]# yum install -y libncurses.so.5

[root@linuxidc tools]# rpm -ivh MySQL-client-5.6.35-1.linux_glibc2.5.i386.rpm

Preparing... ########################################### [100%]

1:MySQL-client ########################################### [100%]

[root@linuxidc tools]# rpm -ivh MySQL-devel-5.6.35-1.linux_glibc2.5.i386.rpm

Preparing... ########################################### [100%]

1:MySQL-devel ########################################### [100%]

6.修改配置文件位置。

[root@linuxidc tools]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf

7.初始化MySQL及修改MySQL默認的root密碼。

[root@linuxidc tools]# /usr/bin/mysql_install_db

[root@linuxidc tools]# ps -ef | grep mysql

root 2188 1 0 14:48 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/linuxidc.pid

mysql 2303 2188 30 14:48 pts/1 00:00:02 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/linuxidc.err --pid-file=/var/lib/mysql/linuxidc.pid

root 2331 1853 0 14:49 pts/1 00:00:00 grep mysql

[root@linuxidc tools]# service mysql start

[root@linuxidc tools]# netstat -anpt | grep 3306

tcp 0 0 :::3306 :::* LISTEN 2303/mysqld

[root@linuxidc tools]# more /root/.mysql_secret

# The random password set for the root user at Thu Apr 9 14:43:59 2015 (local time): F6K3v_xggFoLQeiN

[root@linuxidc tools]# mysql -uroot -pF6K3v_xggFoLQeiN

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 1

Server version: 5.6.21

Copyright (c) 2000, 2014, 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('password');

mysql> GRANT all privileges on *.* TO 'root'@'%' identified by 'password' WITH GRANT OPTION;

mysql> FLUSH PRIVILEGES;

mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('password');

mysql> exit

Bye

[root@linuxidc tools]# mysql -uroot -p123.com

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 6

Server version: 5.6.21 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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>

8.設置MySQL服務開機自啟動。

[root@linuxidc tools]# chkconfig mysql on

[root@linuxidc tools]# chkconfig mysql --list

mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off

總結

以上是生活随笔為你收集整理的centos mysql5.6.35_centos_mysql5.6.35_rpm安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。