当前位置: 首页 > news >正文

Redhat Linux 安装MySQL安装手册

Redhat安装MySQL安装手册

  • 1 下载
  • 2 上传服务器、解压并安装
  • 3 安装
    • 安装过程1:MySQL-shared-5.6.51-1.el7.x86_64.rpm
    • 安装过程2:MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm
    • 安装过程3:MySQL-server-5.6.51-1.el7.x86_64.rpm
    • 安装过程4:MySQL-client-5.6.51-1.el7.x86_64.rpm
    • 安装过程5:MySQL-devel-5.6.51-1.el7.x86_64.rpm
  • 4 启动
    • 启动前报错:ERROR 2002 (HY000)
  • 2 rpm操作
  • 3 yum操作

1 下载

下载地址:点击跳转
https://downloads.mysql.com/archives/community/
在这里插入图片描述
查看服务器Redhat操作系统版本:
[root@localhost etc]# cat redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
注意:下载的数据库版本要对应上操作系统的版本。Redhat 7不能安装Redhat 5 对应的包。

2 上传服务器、解压并安装

MySQL-5.5.13-1.rhel5.x86_64.tar
[root@localhost mysqltar]# ls -l
总用量 169412
-rw-rw-r--. 1 rhel rhel 173475840 8月   4 10:09 MySQL-5.5.13-1.rhel5.x86_64.tar
[root@localhost mysqltar]# tar -xf MySQL-5.5.13-1.rhel5.x86_64.tar 
[root@localhost mysqltar]# ls -l
总用量 338828
-rw-rw-r--. 1 rhel rhel  173475840 8月   4 10:09 MySQL-5.5.13-1.rhel5.x86_64.tar
-rw-r--r--. 1 7161 wheel  18191523 5月  12 2011 MySQL-client-5.5.13-1.rhel5.x86_64.rpm
-rw-r--r--. 1 7161 wheel   3817189 5月  12 2011 MySQL-devel-5.5.13-1.rhel5.x86_64.rpm
-rw-r--r--. 1 7161 wheel  52613561 5月  12 2011 MySQL-embedded-5.5.13-1.rhel5.x86_64.rpm
-rw-r--r--. 1 7161 wheel  53626322 5月  12 2011 MySQL-server-5.5.13-1.rhel5.x86_64.rpm
-rw-r--r--. 1 7161 wheel   2059662 5月  12 2011 MySQL-shared-5.5.13-1.rhel5.x86_64.rpm
-rw-r--r--. 1 7161 wheel  43161486 5月  12 2011 MySQL-test-5.5.13-1.rhel5.x86_64.rpm

3 安装

依次安装

1.yum install MySQL-shared-5.6.51-1.el7.x86_64.rpm #安装mysql兼容包
2.yum install MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm #共享库兼容包
3.yum install MySQL-server-5.6.51-1.el7.x86_64.rpm #安装mysql的服务器程序
4.yum install MySQL-client-5.6.51-1.el7.x86_64.rpm #安装mysql的客户端程序
5.yum install MySQL-devel-5.6.51-1.el7.x86_64.rpm #安装mysql的库和头文件

安装过程1:MySQL-shared-5.6.51-1.el7.x86_64.rpm

[root@localhost install_mysql]# yum install MySQL-shared-5.6.51-1.el7.x86_64.rpm
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-shared-5.5.13-1.rhel5.x86_64.rpm: MySQL-shared-5.5.13-1.rhel5.x86_64
MySQL-shared-5.5.13-1.rhel5.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 MySQL-shared.x86_64.0.5.5.13-1.rhel5 将被 安装
--> 解决依赖关系完成依赖关系解决==========================================================================================================Package             架构          版本                  源                                          大小
==========================================================================================================
正在安装:MySQL-shared        x86_64        5.5.13-1.rhel5        /MySQL-shared-5.5.13-1.rhel5.x86_64        6.7 M事务概要
==========================================================================================================
安装  1 软件包总计:6.7 M
安装大小:6.7 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。正在安装    : MySQL-shared-5.5.13-1.rhel5.x86_64                                                    1/1 验证中      : MySQL-shared-5.5.13-1.rhel5.x86_64                                                    1/1 已安装:MySQL-shared.x86_64 0:5.5.13-1.rhel5        

安装过程2:MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm

[root@localhost install_mysql]# yum install MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm 
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm: MySQL-shared-compat-5.6.51-1.el7.x86_64
MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 MySQL-shared-compat.x86_64.0.5.6.51-1.el7 将被 舍弃
---> 软件包 mariadb-libs.x86_64.1.5.5.56-2.el7 将被 取代
--> 解决依赖关系完成依赖关系解决====================================================================================================Package                架构      版本            源                                           大小
====================================================================================================
正在安装:MySQL-shared-compat    x86_64    5.6.51-1.el7    /MySQL-shared-compat-5.6.51-1.el7.x86_64     11 M替换  mariadb-libs.x86_64 1:5.5.56-2.el7事务概要
====================================================================================================
安装  1 软件包总计:11 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : MySQL-shared-compat-5.6.51-1.el7.x86_64                                         1/2 正在删除    : 1:mariadb-libs-5.5.56-2.el7.x86_64                                              2/2 
警告:文件 /usr/share/mysql/ukrainian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/ukrainian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/swedish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/swedish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/spanish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/spanish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/slovak/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/slovak: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/serbian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/serbian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/russian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/russian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/romanian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/romanian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/portuguese/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/portuguese: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/polish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/polish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian-ny/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian-ny: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/korean/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/korean: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/japanese/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/japanese: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/italian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/italian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/hungarian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/hungarian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/greek/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/greek: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/german/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/german: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/french/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/french: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/estonian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/estonian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/english/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/english: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/dutch/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/dutch: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/danish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/danish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/czech/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/czech: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/swe7.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/macroman.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/macce.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin7.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin5.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin2.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin1.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/koi8u.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/koi8r.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/keybcs2.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/hp8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/hebrew.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/greek.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/geostd8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/dec8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp866.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp852.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp850.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1257.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1256.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1251.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1250.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/ascii.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/armscii8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/README: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/Index.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql: 移除失败: 没有那个文件或目录验证中      : MySQL-shared-compat-5.6.51-1.el7.x86_64                                         1/2 验证中      : 1:mariadb-libs-5.5.56-2.el7.x86_64                                              2/2 已安装:MySQL-shared-compat.x86_64 0:5.6.51-1.el7                                                         替代:mariadb-libs.x86_64 1:5.5.56-2.el7                                                                完毕!

安装过程3:MySQL-server-5.6.51-1.el7.x86_64.rpm

root用户初始密码存放在’/root/.mysql_secret’.

[root@localhost install_mysql]# yum install MySQL-server-5.6.51-1.el7.x86_64.rpm 
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-server-5.6.51-1.el7.x86_64.rpm: MySQL-server-5.6.51-1.el7.x86_64
MySQL-server-5.6.51-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 MySQL-server.x86_64.0.5.6.51-1.el7 将被 安装
--> 解决依赖关系完成依赖关系解决====================================================================================================Package            架构         版本                 源                                       大小
====================================================================================================
正在安装:MySQL-server       x86_64       5.6.51-1.el7         /MySQL-server-5.6.51-1.el7.x86_64       270 M事务概要
====================================================================================================
安装  1 软件包总计:270 M
安装大小:270 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : MySQL-server-5.6.51-1.el7.x86_64                                                1/1 
警告:用户mysql 不存在 - 使用root
警告:群组mysql 不存在 - 使用root
警告:用户mysql 不存在 - 使用root
警告:群组mysql 不存在 - 使用root
2023-08-04 15:03:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-08-04 15:03:42 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2023-08-04 15:03:42 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 113852 ...
2023-08-04 15:03:42 113852 [Note] InnoDB: Using atomics to ref count buffer pool pages
2023-08-04 15:03:42 113852 [Note] InnoDB: The InnoDB memory heap is disabled
2023-08-04 15:03:42 113852 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-08-04 15:03:42 113852 [Note] InnoDB: Memory barrier is not used
2023-08-04 15:03:42 113852 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-08-04 15:03:42 113852 [Note] InnoDB: Using Linux native AIO
2023-08-04 15:03:42 113852 [Note] InnoDB: Using CPU crc32 instructions
2023-08-04 15:03:42 113852 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2023-08-04 15:03:42 113852 [Note] InnoDB: Completed initialization of buffer pool
2023-08-04 15:03:42 113852 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2023-08-04 15:03:42 113852 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2023-08-04 15:03:42 113852 [Note] InnoDB: Database physically writes the file full: wait...
2023-08-04 15:03:42 113852 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2023-08-04 15:03:43 113852 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2023-08-04 15:03:43 113852 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2023-08-04 15:03:43 113852 [Warning] InnoDB: New log files created, LSN=45781
2023-08-04 15:03:43 113852 [Note] InnoDB: Doublewrite buffer not found: creating new
2023-08-04 15:03:43 113852 [Note] InnoDB: Doublewrite buffer created
2023-08-04 15:03:43 113852 [Note] InnoDB: 128 rollback segment(s) are active.
2023-08-04 15:03:43 113852 [Warning] InnoDB: Creating foreign key constraint system tables.
2023-08-04 15:03:43 113852 [Note] InnoDB: Foreign key constraint system tables created
2023-08-04 15:03:43 113852 [Note] InnoDB: Creating tablespace and datafile system tables.
2023-08-04 15:03:43 113852 [Note] InnoDB: Tablespace and datafile system tables created.
2023-08-04 15:03:43 113852 [Note] InnoDB: Waiting for purge to start
2023-08-04 15:03:43 113852 [Note] InnoDB: 5.6.51 started; log sequence number 0
2023-08-04 15:03:43 113852 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2023-08-04 15:03:43 113852 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2023-08-04 15:03:43 113852 [Note] Binlog end
2023-08-04 15:03:43 113852 [Note] InnoDB: FTS optimize thread exiting.
2023-08-04 15:03:43 113852 [Note] InnoDB: Starting shutdown...
2023-08-04 15:03:45 113852 [Note] InnoDB: Shutdown completed; log sequence number 1625977
A random root password has been set. You will find it in '/root/.mysql_secret'.2023-08-04 15:03:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-08-04 15:03:45 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2023-08-04 15:03:45 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 113882 ...
2023-08-04 15:03:45 113882 [Note] InnoDB: Using atomics to ref count buffer pool pages
2023-08-04 15:03:45 113882 [Note] InnoDB: The InnoDB memory heap is disabled
2023-08-04 15:03:45 113882 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-08-04 15:03:45 113882 [Note] InnoDB: Memory barrier is not used
2023-08-04 15:03:45 113882 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-08-04 15:03:45 113882 [Note] InnoDB: Using Linux native AIO
2023-08-04 15:03:45 113882 [Note] InnoDB: Using CPU crc32 instructions
2023-08-04 15:03:45 113882 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2023-08-04 15:03:45 113882 [Note] InnoDB: Completed initialization of buffer pool
2023-08-04 15:03:45 113882 [Note] InnoDB: Highest supported file format is Barracuda.
2023-08-04 15:03:45 113882 [Note] InnoDB: 128 rollback segment(s) are active.
2023-08-04 15:03:45 113882 [Note] InnoDB: Waiting for purge to start
2023-08-04 15:03:45 113882 [Note] InnoDB: 5.6.51 started; log sequence number 1625977
2023-08-04 15:03:45 113882 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2023-08-04 15:03:45 113882 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2023-08-04 15:03:45 113882 [Note] Binlog end
2023-08-04 15:03:45 113882 [Note] InnoDB: FTS optimize thread exiting.
2023-08-04 15:03:45 113882 [Note] InnoDB: Starting shutdown...
2023-08-04 15:03:47 113882 [Note] InnoDB: Shutdown completed; log sequence number 1625987A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.Also, the account for the anonymous user has been removed.In addition, you can run:/usr/bin/mysql_secure_installationwhich will also give you the option of removing the test database.
This is strongly recommended for production servers.See the manual for more instructions.Please report any problems at http://bugs.mysql.com/The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comNew default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings验证中      : MySQL-server-5.6.51-1.el7.x86_64                                                1/1 已安装:MySQL-server.x86_64 0:5.6.51-1.el7                                                                完毕!

安装过程4:MySQL-client-5.6.51-1.el7.x86_64.rpm

[root@localhost install_mysql]# yum install MySQL-client-5.6.51-1.el7.x86_64.rpm 
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-client-5.6.51-1.el7.x86_64.rpm: MySQL-client-5.6.51-1.el7.x86_64
MySQL-client-5.6.51-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 MySQL-client.x86_64.0.5.6.51-1.el7 将被 安装
--> 解决依赖关系完成依赖关系解决=========================================================================================================================================================================================================Package                                     架构                                  版本                                           源                                                                大小
=========================================================================================================================================================================================================
正在安装:MySQL-client                                x86_64                                5.6.51-1.el7                                   /MySQL-client-5.6.51-1.el7.x86_64                                 82 M事务概要
=========================================================================================================================================================================================================
安装  1 软件包总计:82 M
安装大小:82 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : MySQL-client-5.6.51-1.el7.x86_64                                                                                                                                                     1/1 验证中      : MySQL-client-5.6.51-1.el7.x86_64                                                                                                                                                     1/1 已安装:MySQL-client.x86_64 0:5.6.51-1.el7                                                                                                                                                                     完毕!
[root@localhost install_mysql]# 

安装过程5:MySQL-devel-5.6.51-1.el7.x86_64.rpm

[root@localhost install_mysql]# yum install MySQL-devel-5.6.51-1.el7.x86_64.rpm 
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-devel-5.6.51-1.el7.x86_64.rpm: MySQL-devel-5.6.51-1.el7.x86_64
MySQL-devel-5.6.51-1.el7.x86_64.rpm:不更新已安装的软件包。
错误:无须任何处理
[root@localhost install_mysql]# yum install MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm 
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Bad id for repo: mirrors.aliyun.com_docker-ce_linux_centos_docker-ce.xn--repo()-mu8ig98h4l0hokj, byte = ( 60
正在检查 MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm: MySQL-shared-compat-5.6.51-1.el7.x86_64
MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 MySQL-shared-compat.x86_64.0.5.6.51-1.el7 将被 舍弃
---> 软件包 mariadb-libs.x86_64.1.5.5.56-2.el7 将被 取代
--> 解决依赖关系完成依赖关系解决====================================================================================================Package                架构      版本            源                                           大小
====================================================================================================
正在安装:MySQL-shared-compat    x86_64    5.6.51-1.el7    /MySQL-shared-compat-5.6.51-1.el7.x86_64     11 M替换  mariadb-libs.x86_64 1:5.5.56-2.el7事务概要
====================================================================================================
安装  1 软件包总计:11 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : MySQL-shared-compat-5.6.51-1.el7.x86_64                                         1/2 正在删除    : 1:mariadb-libs-5.5.56-2.el7.x86_64                                              2/2 
警告:文件 /usr/share/mysql/ukrainian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/ukrainian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/swedish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/swedish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/spanish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/spanish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/slovak/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/slovak: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/serbian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/serbian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/russian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/russian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/romanian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/romanian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/portuguese/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/portuguese: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/polish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/polish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian-ny/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian-ny: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/norwegian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/korean/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/korean: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/japanese/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/japanese: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/italian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/italian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/hungarian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/hungarian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/greek/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/greek: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/german/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/german: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/french/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/french: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/estonian/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/estonian: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/english/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/english: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/dutch/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/dutch: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/danish/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/danish: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/czech/errmsg.sys: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/czech: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/swe7.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/macroman.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/macce.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin7.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin5.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin2.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/latin1.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/koi8u.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/koi8r.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/keybcs2.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/hp8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/hebrew.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/greek.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/geostd8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/dec8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp866.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp852.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp850.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1257.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1256.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1251.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/cp1250.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/ascii.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/armscii8.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/README: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets/Index.xml: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql/charsets: 移除失败: 没有那个文件或目录
警告:文件 /usr/share/mysql: 移除失败: 没有那个文件或目录验证中      : MySQL-shared-compat-5.6.51-1.el7.x86_64                                         1/2 验证中      : 1:mariadb-libs-5.5.56-2.el7.x86_64                                              2/2 已安装:MySQL-shared-compat.x86_64 0:5.6.51-1.el7                                                         替代:mariadb-libs.x86_64 1:5.5.56-2.el7                                                                完毕!

4 启动

启动前报错:ERROR 2002 (HY000)

该报错是MySQL未启动导致

[root@localhost etc]# mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost ~]# ps -ef|grep mysql
root     120137  84527  0 17:12 pts/2    00:00:00 grep --color=auto mysql

启动即可正常连接

[root@localhost etc]# cd init.d/
[root@localhost init.d]# ls
functions  mysql  netconsole  network  README  rhnsd
[root@localhost init.d]# ./mysql start
Starting MySQL.. SUCCESS! 
[root@localhost init.d]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.51Copyright (c) 2000, 2021, 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> Ctrl-C -- exit!

2 rpm操作

安装命令:
# rpm -ivh MySQL-server-5.1.73-1.glibc23.i386.rpm
查看安装包:
# rpm -qa | grep -i  mysql
卸载命令:
# rpm -e mysql-libs-5.1.73.8.e16_8.i686 //普通删除模式
# rpm -e __nodeps mysql-libs-5.1.73.8.e16_8.i686 //强力删除模式,如果使用上面的指令删除时.提示有依赖,则可用该命令进行强力删除

3 yum操作

安装命令
# yum install MySQL-shared-5.5.13-1.rhel5.x86_64.rpm 
卸载命令
# yum remove mysql-libs-5.1.73.8.e16_8.i686 

相关文章:

Redhat Linux 安装MySQL安装手册

Redhat安装MySQL安装手册 1 下载2 上传服务器、解压并安装3 安装安装过程1:MySQL-shared-5.6.51-1.el7.x86_64.rpm安装过程2:MySQL-shared-compat-5.6.51-1.el7.x86_64.rpm安装过程3:MySQL-server-5.6.51-1.el7.x86_64.rpm安装过程4&#xff…...

题目:2303.计算应缴税款总额

​​题目来源: leetcode题目,网址:2303. 计算应缴税款总额 - 力扣(LeetCode) 解题思路: 按要求计算即可。注意最多产生 n1 个不同区间内的税款即可。 解题代码: class Solution {public doub…...

Kotlin 1.9.0 发布:带来多项新特性,改进 Multiplatform/Native 支持

新特性 Kotlin 的最新版本引入了许多新的语言特性&#xff0c;包括用于开放范围的…<操作符、扩展正则表达式等。此外&#xff0c;它还改进了 Kotlin Multiplatform 和 Kotlin/Native 支持。 Kotlin 1.9 稳定了与枚举类关联的 entries 属性&#xff0c;它会返回所定义的枚…...

接口测试——认知(一)

目录 引言 环境准备 1. 为什么要进行接口测试 2. 什么是接口 3. 接口测试与功能测试的区别 引言 为什么要做接口自动化测试&#xff1f; 在当前互联网产品迭代频繁的背景下&#xff0c;回归测试的时间越来越少&#xff0c;很难在每个迭代都对所有功能做完整回归。 但接…...

剑指 Offer 10- I. 斐波那契数列

写一个函数&#xff0c;输入 n &#xff0c;求斐波那契&#xff08;Fibonacci&#xff09;数列的第 n 项&#xff08;即 F(N)&#xff09;。斐波那契数列的定义如下&#xff1a; F(0) 0, F(1) 1 F(N) F(N - 1) F(N - 2), 其中 N > 1. 斐波那契数列由 0 和 1 开始&am…...

洪水填充算法详解

&#x1f61c;作 者&#xff1a;是江迪呀✒️本文关键词&#xff1a;算法、前端、JavaScript、HTML、洪水填充算法☀️每日 一言&#xff1a;不以物喜&#xff0c;不以己悲 一、前言 当象一个容器中注水时&#xff0c;无论容器的结构如何复杂&#xff0c;注入的水…...

ubuntu18.04安装docker及docker基本命令的使用

官网安装步骤&#xff1a;https://docs.docker.com/desktop/install/ubuntu/ docker快速入门教程 Ubuntu-Docker安装和使用 docker官网 docker-hub仓库 1、常用指令 &#xff08;1&#xff09;镜像操作 # ############################# 以nginx为例 docker images docker p…...

DataWhale 机器学习夏令营第二期——AI量化模型预测挑战赛 学习记录

DataWhale 机器学习夏令营第二期 学习记录一 (2023.08.06)1. 问题建模1.1 赛事数据数据集情况数据中缺失值类别和数值特征的基本分布 1.2 评价指标中间价的计算方式价格移动方向说明 1.3 线下验证 DataWhale 机器学习夏令营第二期 ——AI量化模型预测挑战赛 已跑通baseline&…...

简单认识ELK日志分析系统

一. ELK日志分析系统概述 1.ELK 简介 ELK平台是一套完整的日志集中处理解决方案&#xff0c;将 ElasticSearch、Logstash 和 Kiabana 三个开源工具配合使用&#xff0c; 完成更强大的用户对日志的查询、排序、统计需求。 好处&#xff1a; &#xff08;1&#xff09;提高安全…...

【算法笔记】深度优先遍历-解决排列组合问题-

深度优先遍历-解决排列组合问题 问题1&#xff1a; 假设袋子里有编号为1,2,…,m这m个球。现在每次从袋子中取一个球记下编号&#xff0c;放回袋中再取&#xff0c;取n次作为一组&#xff0c;枚举所有可能的情况。 分析&#xff1a; 每一次取都有m种可能的情况&#xff0c;因此…...

【雕爷学编程】Arduino动手做(184)---快餐盒盖,极低成本搭建机器人实验平台2

吃完快餐粥&#xff0c;除了粥的味道不错之外&#xff0c;我对个快餐盒的圆盖子产生了兴趣&#xff0c;能否做个极低成本的简易机器人呢&#xff1f;也许只需要二十元左右 知识点&#xff1a;轮子&#xff08;wheel&#xff09; 中国词语。是用不同材料制成的圆形滚动物体。简…...

应急响应-勒索病毒的处理思路

0x00 关于勒索病毒的描述 勒索病毒入侵方式&#xff1a;服务弱口令&#xff0c;未授权&#xff0c;邮件钓鱼&#xff0c;程序木马植入&#xff0c;系统漏洞等 勒索病毒的危害&#xff1a;主机文件被加密&#xff0c;且几乎难以解密&#xff0c;对主机上的文件信息以及重要资产…...

ChatGPT是否能够处理多模态数据和多模态对话?

ChatGPT有潜力处理多模态数据和多模态对话&#xff0c;这将进一步扩展其在各种应用领域中的实用性。多模态数据是指包含多种不同类型的信息&#xff0c;例如文本、图像、音频和视频等。多模态对话是指涉及多种媒体形式的对话交流&#xff0c;例如同时包含文本和图像的对话。 *…...

AcWing1171. 距离(lcatarjan)

输入样例1&#xff1a; 2 2 1 2 100 1 2 2 1输出样例1&#xff1a; 100 100输入样例2&#xff1a; 3 2 1 2 10 3 1 15 1 2 3 2输出样例2&#xff1a; 10 25 #include<bits/stdc.h> using namespace std; typedef long long ll; const int N2e55; int n,m,x,y,k,r…...

JVM-运行时数据区

目录 什么是运行时数据区&#xff1f; 方法区 堆 程序计数器 虚拟机栈 局部变量表 操作数栈 动态连接 运行时常量池 方法返回地址 附加信息 本地方法栈 总结&#xff1a; 什么是运行时数据区&#xff1f; Java虚拟机在执行Java程序时&#xff0c;将它管…...

RedisTemplate中boundHashOps的使用

1、往指定key中存储 键值 redisTemplate.boundHashOps("demo").put("1",1); 2、根据指定key中得键取出值 System.out.println(redisTemplate.boundHashOps("demo").get("1")); 3、根据指定key中得键删除 redisTemplate.boundHash…...

计算机网络-性能指标

计算机网络-性能指标 文章目录 计算机网络-性能指标简介速率比特速率 带宽吞吐量时延时延计算 时延带宽积往返时间网络利用率丢包率总结 简介 性能指标可以从不同的方面来度量计算机网络的性能 常用的计算机网络的性能指标有以下8个 速率带宽吞吐量时延时延带宽积往返时间利…...

排序第一课【插入排序】直接插入排序 与 希尔排序

目录 1. 排序的概念&#xff1a; 2.插入排序基本思想 3.直接插入排序 4.希尔排序 1. 排序的概念&#xff1a; 排序&#xff1a;所谓排序&#xff0c;就是使一串记录&#xff0c;按照其中的某个或某些关键字的大小&#xff0c;递增或递减的排列起来的操作。 稳定性&#xf…...

云计算——ACA学习 云计算概述

作者简介&#xff1a;一名云计算网络运维人员、每天分享网络与运维的技术与干货。 座右铭&#xff1a;低头赶路&#xff0c;敬事如仪 个人主页&#xff1a;网络豆的主页​​​​​ 目录 写在前面 上章回顾 本章简介 本章目标 一.云计算产生背景 1.信息时代的重点变革…...

如何为网站进行全面的整站翻译?

要翻译整个网站&#xff0c;可以按照以下步骤进行&#xff1a; 确定翻译需求&#xff1a;确定你需要将整个网站翻译成哪种语言。这可以根据你的目标受众和市场进行决定。 寻找翻译资源&#xff1a;你可以选择以下几种方式来进行网站翻译&#xff1a; a. 人工翻译&#xff1a;雇…...

项目部署(前后端分离)

1、前端项目 &#xff08;打包成dist文件,放到nginx的html目录下面&#xff09;&#xff0c;然后配置nginx 2、后端项目部署 使用之前的shell脚本&#xff08;然后赋予用户权限&#xff09;&#xff0c;最后运行脚本 查看进程...

增强型Web安全网关在银行的应用

销售&#xff0c;绝不是降低身份去取悦客户&#xff0c;而是像朋友一样给予合理的建议。你刚好需要&#xff0c;我刚好专业&#xff01;仅此而已&#xff01; 乔.吉拉德 健康的安全体系&#xff0c;还可以更完善 浙江某商业银行股份有限公司是一家成立多年的商业银行&#xf…...

Oracle-ORA-00600:[ktspffbmb:objdchk_kcbnew_3]

问题背景: 应用执行存储过程报错ORA-00600: 内部错误代码, 参数: [ktspffbmb:objdchk_kcbnew_3], [0], [3303775], [4], [], [], [], [], [], [], [], []&#xff0c;导致过程无法正常执行 ORA-00600: 内部错误代码, 参数: [ktspffbmb:objdchk_kcbnew_3], [0], [3303775], [4]…...

SPINN:基于设备和云的神经网络协同递进推理

SPINN&#xff1a;基于设备和云的神经网络协同递进推理 论文标题&#xff1a;SPINN: synergistic progressive inference of neural networks over device and cloud 原文链接&#xff1a;https://dl.acm.org/doi/10.1145/3372224.3419194 论文动机 现代CNN过多的计算需求&am…...

数据结构-二叉树

数据结构-二叉树 二叉树的概念二叉树的遍历分类 建立二叉树&#xff0c;并遍历二叉树的最小单元二叉树的最小单元初始化初始化二叉树前序遍历的实现中序遍历的实现后序遍历的实现计算节点的个数计算树的深度求第k层的个数查找二叉树的元素分层遍历 全部代码如下 二叉树的概念 二…...

Open3D 进阶(4)高斯混合点云聚类

目录 一、算法原理1、原理概述2、实现流程3、参考文献二、代码实现三、结果展示四、测试数据本文由CSDN点云侠原创,原文链接。爬虫网站自重。 一、算法原理 1、原理概述 高斯混合聚类(GMM)算法假设数据点是由一个或多个高斯分布生成的,并通过最大似然估计的方法来估计每个簇…...

计算机组成和IO

文章目录 计组和Epoll&#xff1a;计算机组成原理&#xff1a;网络数据接收的流程&#xff1a;内核如何管理socket以及状态的更新select系统调用的复杂度epoll的et和lt模式及java的选择 国内访问chatai就可以 https://aiweb.douguguo.com/?typeadd计组和Epoll&#xff1a; 计…...

STM32CUBUMX配置RS485 modbus STM32(从机)亲测可用

———————————————————————————————————— ⏩ 大家好哇&#xff01;我是小光&#xff0c;嵌入式爱好者&#xff0c;一个想要成为系统架构师的大三学生。 ⏩最近在开发一个STM32H723ZGT6的板子&#xff0c;使用STM32CUBEMX做了很多驱动&#x…...

系统设计类题目汇总

1 设计一个系统统计当前时刻北京用户在线人数 【Redis】位图以及位图的使用场景(统计在线人数和用户在线状态) 1.1 方案一&#xff1a; 在用户登录时&#xff0c;使用 Redis SET 将用户 ID 添加到一个特定的键&#xff08;例如 “online:beijing”&#xff09;。用户退出时&…...

css滚动条样式指南

css滚动条样式指南 滚动条是网页设计中经常被忽视的元素。虽然它看起来像是一个小细节&#xff0c;但它在网站导航中起着至关重要的作用。默认的滚动条可能看起来不合适&#xff0c;有损整体美观。本文将介绍如何使用 CSS 自定义滚动条。 在 Chrome、Edge 和 Safari 中设置滚…...