当前位置: 首页 > 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;雇…...

从安装到第一个程序:VS2022社区版+C语言开发极简入门(含代码模板)

从安装到第一个程序&#xff1a;VS2022社区版C语言开发极简入门 在数字化浪潮席卷各行各业的今天&#xff0c;编程能力已成为继外语之后的又一基础技能。对于非计算机专业背景的学习者而言&#xff0c;选择合适的学习路径尤为重要。Visual Studio 2022社区版作为微软官方提供的…...

从安防摄像头到直播:手把手教你用ZLMediaKit搭建GB28181视频监控平台

从安防摄像头到直播&#xff1a;手把手教你用ZLMediaKit搭建GB28181视频监控平台 在智能安防和物联网快速发展的今天&#xff0c;视频监控系统的网络化和智能化已成为行业标配。GB28181作为国内视频监控领域的国家标准协议&#xff0c;实现了不同厂商设备间的互联互通。而ZLMed…...

效率倍增:基于快马平台集成最新openclaw构建自动化采集工具

最近在做一个数据采集项目时&#xff0c;发现手动写爬虫实在太费时间了。每次都要重复处理请求头、代理设置、数据清洗这些基础工作&#xff0c;效率特别低。后来发现了openclaw这个工具包的新版本&#xff0c;正好结合InsCode(快马)平台快速搭建了一个自动化采集工具&#xff…...

Windows驱动管理与系统优化:DriverStore Explorer全方位解决方案

Windows驱动管理与系统优化&#xff1a;DriverStore Explorer全方位解决方案 【免费下载链接】DriverStoreExplorer Driver Store Explorer [RAPR] 项目地址: https://gitcode.com/gh_mirrors/dr/DriverStoreExplorer 设备驱动维护是保障Windows系统稳定运行的核心环节&…...

Vue3前端集成Gemma-3-12B-IT:构建智能聊天界面

Vue3前端集成Gemma-3-12B-IT&#xff1a;构建智能聊天界面 用最简单的方式&#xff0c;让你的Vue3项目拥有智能对话能力 1. 为什么要在Vue3中集成智能聊天功能 现在很多网站和应用都需要智能对话功能&#xff0c;不管是客服系统、学习助手还是内容创作工具。Gemma-3-12B-IT作为…...

ComputeSharp未来展望:GPU计算在.NET生态中的发展路线图

ComputeSharp未来展望&#xff1a;GPU计算在.NET生态中的发展路线图 【免费下载链接】ComputeSharp A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU comp…...

从零开始:使用VSCode + CMake + Ninja + GCC构建高效MCU开发环境

1. 为什么需要这套开发环境&#xff1f; 作为一名在嵌入式领域摸爬滚打多年的开发者&#xff0c;我深知传统IDE的痛点。记得刚入行时&#xff0c;公司清一色使用某商业IDE&#xff0c;直到某天收到法务部的紧急通知——需要立即处理软件版权问题。这让我意识到&#xff0c;基于…...

如何用Captum实现多任务学习解释:复杂模型的归因策略终极指南

如何用Captum实现多任务学习解释&#xff1a;复杂模型的归因策略终极指南 【免费下载链接】captum Model interpretability and understanding for PyTorch 项目地址: https://gitcode.com/gh_mirrors/ca/captum Captum是一个基于PyTorch的模型可解释性库&#xff0c;专…...

QRCoder:开发者必备的二维码生成解决方案全攻略

QRCoder&#xff1a;开发者必备的二维码生成解决方案全攻略 【免费下载链接】QRCoder A pure C# Open Source QR Code implementation 项目地址: https://gitcode.com/gh_mirrors/qr/QRCoder 在数字化时代&#xff0c;二维码已成为信息传递的重要桥梁&#xff0c;但如何…...

TP-LINK路由器IPTV功能实战:解决浙江电信DHCP+获取失败问题

TP-LINK路由器IPTV功能深度解析&#xff1a;从LLDP协议到浙江电信DHCP故障排查 浙江电信的IPTV用户最近频繁反馈一个棘手问题&#xff1a;当使用TP-LINK路由器的IPTV功能时&#xff0c;机顶盒无法通过DHCP协议获取IP地址。这个看似简单的网络故障背后&#xff0c;实则隐藏着LLD…...