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 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/29569.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Flutter运行app时向logcat输出当前打开的界面路径且点击可跳转

当一个项目大了目录文件多了,我们往往会为了找到一个文件花费大量的时间和精力,为了快捷方便的调试我们的项目,我们往往需要在打开app运行的时候需要知道当前打开的界面的文件在哪儿,我们这个代码就能快捷的知道我们app正在打开的…

spring-cache框架使用笔记

spring-cache框架使用笔记 什么是spring-cache框架 spring-cache是spring框架中的一个缓存抽象层, 它提供了一种简便的方式来集成不同的底层缓存实现, 如内存缓存(concurrentMap/ehcache/caffeine)/分布式缓存(redis/couchbase)等 它简化了在app中使用…

现代C++中的从头开始深度学习【1/8】:基础知识

一、说明 提及机器学习框架与研究和工业的相关性。现在很少有项目不使用Google TensorFlow或Meta PyTorch,在于它们的可扩展性和灵活性。也就是说,花时间从头开始编码机器学习算法似乎违反直觉,即没有任何基本框架。然而,事实并非…

Unity制作护盾——2、力场冲击波护盾

Unity制作力场护盾 大家好,我是阿赵。   继续做护盾,这一期做一个力场冲击波护盾。 一、效果展示 主要的效果并不是这个球,而是护盾在被攻击的时候,会出现一个扩散的冲击波。比如上图在右边出现了冲击波 如果在左边被攻击&am…

C/C++面试总结

一、关键字static、const、extern、volatile作用 1、const 1.修饰常量 用const修饰的变量是不可变的,修饰后的变量只能使用,不能修改。 2.修饰指针 如果const位于*的左侧,eg:const int* a,则const就是用来修饰指针…

Java基础八 - HTTP相关/Cookie/Session/网络攻击

一、 反射/序列化/拷贝 1. 反射 //反射主要是指程序可以访问、检测和修改它本身状态或行为的一种能力 //在Yaml数据驱动自动化框架比较适用,能获取到当前的类名及方法名 import java.lang.reflect.*;public class ReflectionExample {public static void main(Str…

KingBaseDB对POINT类型和PATH类型的应用

前言 由于业务需要对坐标信息进行存储,包括中心点和区域坐标数组,然后就开始考虑数据的存储问题,刚开始想着用最简单的两个字段分别存储经度纬度,这样发现关联查询表可能会比较多,有点麻烦。之后想起来kingbase好像有…

linux中彻底卸载jenkins

要彻底卸载 Jenkins,你需要删除与 Jenkins 相关的文件、目录和配置。以下是一些步骤: 1. **停止 Jenkins 服务:** 在卸载 Jenkins 之前,首先停止 Jenkins 服务。使用以下命令停止 Jenkins 服务: sudo systemctl stop jenki…

Mr. Cappuccino的第56杯咖啡——Mybatis拦截器

Mybatis拦截器 概述应用场景项目结构实现分页查询其它拦截器的使用 概述 Mybatis允许使用者在映射语句执行过程中的某一些指定的节点进行拦截调用,通过织入拦截器,在不同节点修改一些执行过程中的关键属性,从而影响SQL的生成、执行和返回结果…

LLVM笔记2 Intermediate Representation (IR)

参考链接:https://llvm.org/devmtg/2019-04/slides/Tutorial-Bridgers-LLVM_IR_tutorial.pdf https://zhuanlan.zhihu.com/p/163063995 https://zhuanlan.zhihu.com/p/163328574 文章目录 IR的布局1. IR语法2.IR递归函数3.使用迭代的方式4.全局变量5.LLVM’s type s…

【模型加速部署】—— Pytorch自动混合精度训练

自动混合精度 torch. amp为混合精度提供了方便的方法,其中一些操作使用torch.float32(浮点)数据类型,而其他操作使用精度较低的浮点数据类型(lower_precision_fp):torch.float16(half)或torch.…

(03)Unity HTC VRTK 基于 URP 开发记录

1.简介 本篇主要内容为:URP如何与VRTK结合、URP需要注意的地方、VRTK的功能进行阐述。 因项目本身要求要渲染出比较好的画质,所以抛弃了Unity默认渲染管线Built-in,使用URP进行渲染,当然也可以选HDRP,但考虑到后期项目…

Stable Diffusion教程(9) - AI视频转动漫

配套抖音视频教程:https://v.douyin.com/UfTcrcJ/ 安装mov2mov插件 打开webui点击扩展->从网址安装输入地址,然后点击安装 https://github.com/Scholar01/sd-webui-mov2mov 最后重启webui 下载模型 从国内liblib AI 模型站下载模型 LiblibAI哩…

锦程消费金融业务生变:App下架,部分自营信贷暂停

来源 | 镭射财经(leishecaijing) 被誉为消金房抵一哥的锦程消费金融,调整旗下自营信贷业务,展业回归房抵场景。 「镭射财经」独家获悉,锦程消费金融已暂停部分自营小额信贷业务,旗下锦囊贷App已经下架&am…

通过anvt X6和vue3实现图编辑

通过anvt X6 X6地址&#xff1a;https://x6.antv.antgroup.com/tutorial/about&#xff1b; 由于节点比较复杂&#xff0c;使用vue实现的节点&#xff1b; x6提供了一个独立的包 antv/x6-vue-shape 来使用 Vue 组件渲染节点。 VUE3的案例&#xff1a; <template><div…

软工导论知识框架(五)面向对象方法学

传统软件工程方法学适用于中小型软件产品开发&#xff1b; 面向对象软件工程方法学适用于大型软件产品开发。 一.四要素 对象&#xff0b;类&#xff0b;继承&#xff0b;传递消息实现通信 二.概念 1.对象&#xff1a;具有相同状态的一组操作的集合&#xff0c;对状态和操作…

数据挖掘全流程解析

数据挖掘全流程解析 数据指标选择 在这一阶段&#xff0c;使用直方图和柱状图的方式对数据进行分析&#xff0c;观察什么数据属性对于因变量会产生更加明显的结果。 如何绘制直方图和条形统计图 数据清洗 观察数据是否存在数据缺失或者离群点的情况。 数据异常的两种情况…

Golang实现Redis分布式锁解决秒杀问题

先写一个脚本sql&#xff0c;插入2000个用户 INSERT INTO sys_users (mobile, password) SELECT numbers.n AS mobile,$2a$10$zKQfSn/GCcR6MX4nHk3MsOMhJnI0qxN4MFdiufDMH2wzuTaR9G1sq AS password FROM (SELECT ones.n tens.n*10 hundreds.n*100 thousands.n*1000 1 AS n…

成功解决ubuntu-22.04的sudo apt-get update一直卡在【0% [Waiting for headers]】

成功解决ubuntu-22.04的sudo apt-get update一直卡在【0% [Waiting for headers]】 问题描述解决方案 问题描述 在下载安装包的时候一直卡在0% [Waiting for headers]&#xff0c;报错信息如下&#xff1a; Get:1 file:/var/cudnn-local-repo-ubuntu1804-8.5.0.96 InRelease […

[国产MCU]-BL602开发实例-PWM

PWM 文章目录 PWM1、BL602的PWM介绍2、PWM驱动API介绍3、PWM使用示例脉冲宽度调制(Pulse width modulation,简称PWM)是一种模拟控制方式,根据相应载荷的变化来调制晶体管基极或MOS管栅极的偏置,来实现晶体管或MOS管导通时间的改变,从而实现开关稳定电源输出的改变。这种方…