IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> centos安装MySQ服务问题 -> 正文阅读

[系统运维]centos安装MySQ服务问题

[aurora@localhost ~]$ su
Password:
[root@localhost aurora]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

当显示以下内容为安装正常:
100%[======================================>] 25,548 93.4KB/s in 0.3s
2022-05-09 01:00:20 (93.4 KB/s) - ‘mysql57-community-release-el7-10.noarch.rpm.2’ saved [25548/25548]
-c: No such file or directory
No URLs found in -c.
FINISHED --2022-05-09 01:00:20–
Total wall clock time: 8.5s
Downloaded: 1 files, 25K in 0.3s (93.4 KB/s)

[root@localhost aurora]# yum -y install mysql57-community-release-el7-10.noarch.rpm

Loaded plugins: fastestmirror, langpacks
Examining mysql57-community-release-el7-10.noarch.rpm: mysql57-community-release-el7-10.noarch
mysql57-community-release-el7-10.noarch.rpm: does not update installed package.
Error: Nothing to do
[root@localhost aurora]# yum -y install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    No package mysql-community-server available
    Error: Nothing to do

[root@localhost aurora]# whereis mysql
mysql: /usr/lib64/mysql /usr/share/mysql

[root@localhost aurora]# find / -name mysql
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/selinux/targeted/active/modules/100/mysql
/usr/lib64/mysql
/usr/share/mysql

[root@localhost aurora]# rpm -qa|grep mysql
mysql57-community-release-el7-10.noarch

[root@localhost aurora]# rpm -qa|grep mysql
mysql57-community-release-el7-10.noarch

[root@localhost aurora]# yum -y install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com

No package mysql-community-server available.
Error: Nothing to do

[root@localhost aurora]# wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

100%[======================================>] 9,224 --.-K/s in 0s
2022-05-09 01:11:13 (168 MB/s) - ‘mysql57-community-release-el7-9.noarch.rpm’ saved [9224/9224]

[root@localhost aurora]# rpm -ivh mysql57-community-release-el7-9.noarch.rpm

warning: mysql57-community-release-el7-9.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing… ################################# [100%]
package mysql57-community-release-el7-10.noarch (which is newer than mysql57-community-release-el7-9.noarch) is already installed
file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql from install of mysql57-community-release-el7-9.noarch conflicts with file from package mysql57-community-release-el7-10.noarch
file /etc/yum.repos.d/mysql-community-source.repo from install of mysql57-community-release-el7-9.noarch conflicts with file from package mysql57-community-release-el7-10.noarch
file /etc/yum.repos.d/mysql-community.repo from install of mysql57-community-release-el7-9.noarch conflicts with file from package mysql57-community-release-el7-10.noarch

[root@localhost aurora]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# yum install mysql-server

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com

No package mysql-server available.
Error: Nothing to do

[root@localhost yum.repos.d]# yum -y remove mysql57-community-release-el7-10.noarch

Removing:
mysql57-community-release noarch el7-10 installed
Complete!

[root@localhost aurora]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

100%[======================================>] 25,548 7.72KB/s in 3.2s

2022-05-09 01:17:18 (7.72 KB/s) - ‘mysql57-community-release-el7-10.noarch.rpm.4’ saved [25548/25548]

-c: No such file or directory
No URLs found in -c.
FINISHED --2022-05-09 01:17:18–
Total wall clock time: 6.7s
Downloaded: 1 files, 25K in 3.2s (7.72 KB/s)

[root@localhost aurora]# yum -y install mysql57-community-release-el7-10.noarch.rpm

[root@localhost aurora]# yum -y install mysql-community-server

[root@localhost aurora]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.
[root@localhost aurora]# systemctl start mysql.service
Failed to start mysql.service: Unit not found.
[root@localhost aurora]# systemctl restart mysqld.service
Failed to restart mysqld.service: Unit not found.
[root@localhost aurora]# systemctl start mysqld
Failed to start mysqld.service: Unit not found.
[root@localhost aurora]# systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.
[root@localhost aurora]# yum install -y mysql-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Resolving Dependencies
    –> Running transaction check
    —> Package mysql-community-server.x86_64 0:5.7.38-1.el7 will be installed
    –> Processing Dependency: mysql-community-common(x86-64) = 5.7.38-1.el7 for package: mysql-community-server-5.7.38-1.el7.x86_64
    –> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.38-1.el7.x86_64
    –> Running transaction check
    —> Package mariadb.x86_64 1:5.5.68-1.el7 will be obsoleted
    —> Package mysql-community-client.x86_64 0:5.7.38-1.el7 will be obsoleting
    –> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.38-1.el7.x86_64
    —> Package mysql-community-common.x86_64 0:5.7.38-1.el7 will be installed
    –> Running transaction check
    —> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be obsoleted
    –> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
    –> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
    —> Package mysql-community-libs.x86_64 0:5.7.38-1.el7 will be obsoleting
    –> Running transaction check
    —> Package mysql-community-libs-compat.x86_64 0:5.7.38-1.el7 will be obsoleting
    —> Package postfix.x86_64 2:2.10.1-6.el7 will be updated
    —> Package postfix.x86_64 2:2.10.1-9.el7 will be an update
    –> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size

Installing:
mysql-community-client x86_64 5.7.38-1.el7 mysql57-community 28 M
replacing mariadb.x86_64 1:5.5.68-1.el7
mysql-community-libs x86_64 5.7.38-1.el7 mysql57-community 2.6 M
replacing mariadb-libs.x86_64 1:5.5.68-1.el7
mysql-community-libs-compat x86_64 5.7.38-1.el7 mysql57-community 1.2 M
replacing mariadb-libs.x86_64 1:5.5.68-1.el7
mysql-community-server x86_64 5.7.38-1.el7 mysql57-community 178 M
Installing for dependencies:
mysql-community-common x86_64 5.7.38-1.el7 mysql57-community 311 k
Updating for dependencies:
postfix x86_64 2:2.10.1-9.el7 base 2.4 M

Transaction Summary

Install 4 Packages (+1 Dependent package)
Upgrade ( 1 Dependent package)

Total size: 212 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-client-5.7.38-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

The GPG keys listed for the “MySQL 5.7 Community Server” repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
Failing package is: mysql-community-client-5.7.38-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Failing package is: mysql-community-client-5.7.38-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[root@localhost aurora]# rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
[root@localhost aurora]# yum install -y mysql-serverLoaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Resolving Dependencies
    –> Running transaction check
    —> Package mysql-community-server.x86_64 0:5.7.38-1.el7 will be installed
    –> Processing Dependency: mysql-community-common(x86-64) = 5.7.38-1.el7 for package: mysql-community-server-5.7.38-1.el7.x86_64
    –> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.38-1.el7.x86_64
    –> Running transaction check
    —> Package mariadb.x86_64 1:5.5.68-1.el7 will be obsoleted
    —> Package mysql-community-client.x86_64 0:5.7.38-1.el7 will be obsoleting
    –> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.38-1.el7.x86_64
    —> Package mysql-community-common.x86_64 0:5.7.38-1.el7 will be installed
    –> Running transaction check
    —> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be obsoleted
    –> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
    –> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
    —> Package mysql-community-libs.x86_64 0:5.7.38-1.el7 will be obsoleting
    –> Running transaction check
    —> Package mysql-community-libs-compat.x86_64 0:5.7.38-1.el7 will be obsoleting
    —> Package postfix.x86_64 2:2.10.1-6.el7 will be updated
    —> Package postfix.x86_64 2:2.10.1-9.el7 will be an update
    –> Finished Dependency Resolution

[root@localhost aurora]# rpm -qa |grep mysqlmysql-community-common-5.7.38-1.el7.x86_64

mysql57-community-release-el7-10.noarch
mysql-community-server-5.7.38-1.el7.x86_64
mysql-community-client-5.7.38-1.el7.x86_64
mysql-community-libs-compat-5.7.38-1.el7.x86_64
mysql-community-libs-5.7.38-1.el7.x86_64

[root@localhost aurora]# systemctl start mysqld.service
[root@localhost aurora]# systemctl status mysqld

● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-05-09 01:38:13 PDT; 32s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 41246 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 41183 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 41249 (mysqld)
CGroup: /system.slice/mysqld.service
└─41249 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/my…

May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1468…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1469…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1477…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1478…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1478…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1479…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1550…
May 09 01:38:13 localhost.localdomain mysqld[41246]: 2022-05-09T08:38:13.1558…
May 09 01:38:13 localhost.localdomain mysqld[41246]: Version: ‘5.7.38’ socke…
May 09 01:38:13 localhost.localdomain systemd[1]: Started MySQL Server.
Hint: Some lines were ellipsized, use -l to show in full.

[root@localhost aurora]# vim /etc/my.cnf
添加一行登陆时跳过验证的
[root@localhost aurora]# systemctl start mysqld.service
[root@localhost aurora]# mysql -uroot -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.38 MySQL Community Server (GPL)

Copyright ? 2000, 2022, Oracle and/or its affiliates.

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> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
±-------------------+
4 rows in set (0.00 sec)

mysql>

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2022-05-11 16:45:38  更:2022-05-11 16:48:26 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 15:22:00-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码