MySQL이 설치되었지만 작동하지 않습니다


9

이전 버전을 제거하여 mysql mysql-devel mysql-server를 설치했습니다. 나는 명령을

# rpm -e mysql mysql-server mysql-devel --nodeps
# yum install mysql mysql-server mysql-devel
#  /etc/init.d/mysqld start

그것은 말한다

-bash: /etc/init.d/mysqld: No such file or directory

그런 다음 그것을 찾으려고 했으므로

# locate mysqld
/etc/rc.d/init.d/mysqld
/etc/rc.d/rc0.d/K36mysqld
/etc/rc.d/rc1.d/K36mysqld
/etc/rc.d/rc2.d/S64mysqld
/etc/rc.d/rc3.d/S64mysqld
/etc/rc.d/rc4.d/S64mysqld
/etc/rc.d/rc5.d/S64mysqld
/etc/rc.d/rc6.d/K36mysqld
/usr/bin/mysqld_multi
/usr/bin/mysqld_safe
/usr/bin/mysqldump
/usr/bin/mysqldumpslow
/usr/libexec/mysqld
/usr/share/man/man1/mysqld_multi.1.gz
/usr/share/man/man1/mysqld_safe.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqldumpslow.1.gz
/usr/share/man/man1/safe_mysqld.1.gz
/usr/share/man/man8/mysqld.8.gz
/var/lock/subsys/mysqld
/var/log/mysqld.log
/var/run/mysqld

그래서 검색 후 발견 내가 한 있도록 페이지를

rpm -V mysql

그러나 그것은 말한다

# rpm -V mysql
package mysql is not installed

또한했다

# service mysqld start

그러나 출력은

  mysqld: unrecognized service

그래서 나는 그것을 다시 설치하려고 yum install mysql했지만 이번에는 출력이

 yum install mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Setting up Install Process
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package MySQL-server-5.1.48-1.glibc23.x86_64 already installed and latest version
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package MySQL-server-5.1.48-1.glibc23.x86_64 already installed and latest version
Nothing to do

내가 잘못하고있는 곳을 안내하십시오. 이를 위해 올바른 접근 방법은 무엇입니까?

편집 나는 centos5에 있고

init.d mysql 파일이 이것을 보도록하십시오.

# cd /etc/init.d/
[root@domain init.d]# ls
crond      dc_server  haldaemon  httpd      iptables  iscsid   kudzu         mcstrans    multipathd  netconsole  netplugd  rawdevices  restorecond  sshd
dc_client  functions  halt       ip6tables  iscsi     killall  lvm2-monitor  messagebus  mysql       netfs       network   rdisc       single       syslog

내가 했어

# service mysql start
Starting MySQL SUCCESS!
[root@domain init.d]# mysql
-bash: mysql: command not found
[root@domain init.d]# mysql -u root -h localhost
-bash: mysql: command not found

편집

# rpm -qa | grep -i mysql
MySQL-server-5.1.48-1.glibc23
perl-DBD-MySQL-3.0007-2.el5
php-mysql-5.1.6-27.el5_5.3
MySQL-devel-5.1.48-1.glibc23

내가 할 때마다 yum install mysql mysql-server mysql-develmysql-server 만 설치하고 mysql-devel은 mysql이 아닙니다. 그리고 내가 혼자한다면 yum install mysql:

 yum install mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Setting up Install Process
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package MySQL-server-5.1.48-1.glibc23.x86_64 already installed and latest version
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package MySQL-server-5.1.48-1.glibc23.x86_64 already installed and latest version
Nothing to do

#  yum whatprovides '/usr/bin/mysql'
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
mysql-5.0.77-4.el5_6.6.x86_64 : MySQL client programs and shared libraries
Repo        : base
Matched from:
Filename    : /usr/bin/mysql



mysql-5.0.77-4.el5_6.6.i386 : MySQL client programs and shared libraries
Repo        : base
Matched from:
Filename    : /usr/bin/mysql



MySQL-client-5.1.48-1.glibc23.x86_64 : MySQL - Client
Repo        : smartfile
Matched from:
Filename    : /usr/bin/mysql

다시 편집

# yum remove MySQL-server
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: MySQL-server
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Package(s) MySQL-server available, but not installed.
No Packages marked for removal

때마다 내가 yum install mysql mysql-server mysql-devel그것을 말한다

# yum install mysql mysql-server mysql-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Setting up Install Process
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package mysql-server is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package mysql-devel is obsoleted by MySQL-devel, trying to install MySQL-devel-5.1.48-1.glibc23.x86_64 instead
Package mysql-devel is obsoleted by MySQL-devel, trying to install MySQL-devel-5.1.48-1.glibc23.x86_64 instead
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package MySQL-devel.x86_64 0:5.1.48-1.glibc23 set to be updated
---> Package MySQL-server.x86_64 0:5.1.48-1.glibc23 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                  Arch                               Version                                        Repository                             Size
========================================================================================================================================================================
Installing:
 MySQL-devel                              x86_64                             5.1.48-1.glibc23                               smartfile                             9.4 M
 MySQL-server                             x86_64                             5.1.48-1.glibc23                               smartfile                              19 M

Transaction Summary
========================================================================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 28 M
Is this ok [y/N]:

mysql-server와 mysql-devel만이 mysql 인 세번째 것은 아닙니다.

업데이트

 yum --disablerepo=smartfile install mysql mysql-server mysql-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package mysql.i386 0:5.0.77-4.el5_6.6 set to be updated
--> Processing Dependency: libssl.so.6 for package: mysql
--> Processing Dependency: libcrypto.so.6 for package: mysql
---> Package mysql.x86_64 0:5.0.77-4.el5_6.6 set to be updated
---> Package mysql-devel.i386 0:5.0.77-4.el5_6.6 set to be updated
--> Processing Dependency: openssl-devel for package: mysql-devel
---> Package mysql-devel.x86_64 0:5.0.77-4.el5_6.6 set to be updated
---> Package mysql-server.x86_64 0:5.0.77-4.el5_6.6 set to be updated
--> Running transaction check
---> Package openssl.i686 0:0.9.8e-20.el5 set to be updated
--> Processing Dependency: libgssapi_krb5.so.2 for package: openssl
--> Processing Dependency: libkrb5.so.3(krb5_3_MIT) for package: openssl
--> Processing Dependency: libk5crypto.so.3 for package: openssl
--> Processing Dependency: libk5crypto.so.3(k5crypto_3_MIT) for package: openssl
--> Processing Dependency: libkrb5.so.3 for package: openssl
---> Package openssl-devel.x86_64 0:0.9.8e-20.el5 set to be updated
--> Processing Dependency: krb5-devel for package: openssl-devel
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.6.1-62.el5 set to be updated
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: e2fsprogs-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
---> Package krb5-libs.i386 0:1.6.1-62.el5 set to be updated
--> Processing Dependency: libkeyutils.so.1 for package: krb5-libs
--> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs
--> Running transaction check
---> Package e2fsprogs-devel.x86_64 0:1.39-33.el5 set to be updated
---> Package keyutils-libs.i386 0:1.2-1.el5 set to be updated
---> Package keyutils-libs-devel.x86_64 0:1.2-1.el5 set to be updated
---> Package libselinux-devel.x86_64 0:1.33.4-5.7.el5 set to be updated
--> Processing Dependency: libsepol-devel >= 1.15.2-1 for package: libselinux-devel
--> Running transaction check
---> Package libsepol-devel.x86_64 0:1.15.2-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                         Arch                               Version                                      Repository                        Size
========================================================================================================================================================================
Installing:
 mysql                                           i386                               5.0.77-4.el5_6.6                             base                             4.8 M
 mysql                                           x86_64                             5.0.77-4.el5_6.6                             base                             4.8 M
 mysql-devel                                     i386                               5.0.77-4.el5_6.6                             base                             2.4 M
 mysql-devel                                     x86_64                             5.0.77-4.el5_6.6                             base                             2.5 M
 mysql-server                                    x86_64                             5.0.77-4.el5_6.6                             base                             9.8 M
Installing for dependencies:
 e2fsprogs-devel                                 x86_64                             1.39-33.el5                                  base                             637 k
 keyutils-libs                                   i386                               1.2-1.el5                                    base                              18 k
 keyutils-libs-devel                             x86_64                             1.2-1.el5                                    base                              27 k
 krb5-devel                                      x86_64                             1.6.1-62.el5                                 base                             1.9 M
 krb5-libs                                       i386                               1.6.1-62.el5                                 base                             668 k
 libselinux-devel                                x86_64                             1.33.4-5.7.el5                               base                             149 k
 libsepol-devel                                  x86_64                             1.15.2-3.el5                                 base                             192 k
 openssl                                         i686                               0.9.8e-20.el5                                base                             1.4 M
 openssl-devel                                   x86_64                             0.9.8e-20.el5                                base                             1.9 M

Transaction Summary
========================================================================================================================================================================
Install      14 Package(s)
Upgrade       0 Package(s)

Total size: 31 M
Total download size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mysql-5.0.77-4.el5_6.6.x86_64.rpm                                                                                                         | 4.8 MB     00:00
(2/2): mysql-server-5.0.77-4.el5_6.6.x86_64.rpm                                                                                                  | 9.8 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                    10 MB/s |  15 MB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /etc/pki/tls/certs/ca-bundle.crt from install of openssl-0.9.8e-20.el5.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/ca.1ssl.gz from install of openssl-0.9.8e-20.el5.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/req.1ssl.gz from install of openssl-0.9.8e-20.el5.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/x509.1ssl.gz from install of openssl-0.9.8e-20.el5.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64

Error Summary
-------------

최종 업데이트

# yum remove openssl-0.9.8e-20.el5.i686
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: openssl-0.9.8e-20.el5.i686
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * epel: mirror.steadfast.net
 * extras: mirror.wiredtree.com
 * updates: mirror.ubiquityservers.com
Package(s) openssl-0.9.8e-20.el5.i686 available, but not installed.
No Packages marked for removal

이 버전의 CentOS는 무엇입니까? /etc/init.d-directory는 어디에 있습니까?
Kvisle

편집 참조
Astha

셰인이 말한 것.
Kvisle

@ Kvisle 제 편집을 참조하십시오
Astha

답변:


7
Package mysql is obsoleted by MySQL-server, trying to install MySQL-server-5.1.48-1.glibc23.x86_64 instead
Package MySQL-server-5.1.48-1.glibc23.x86_64 already installed and latest version

MySQL-server홈페이지 에서 패키지 를 다운로드하여로 설치 한 것 같습니다 rpm -ivh. 확인 :

$ rpm -qa | grep MySQL

설치하려는 경우 mysql-server저장소 (기본, EPEL, ...)에서, 당신은 제거해야 MySQL-server실행하여 첫째 :

# yum remove MySQL-*

그리고:

# yum install mysql mysql-server mysql-devel

MySQL-serverpackage 의 init 스크립트는 from mysql대신에 mysqld있습니다 mysql-server. 당신을위한 힌트는 일부 문자 (유형 /etc/init.d/mys)를 눌러 Tab또는 TabTab.


mysql을 설치하면 mysql 대신 mysql-server가 자동으로 설치됩니다. 내 편집을 참조하십시오.
Astha

편집 내용이 보이지 않습니다. rpm -qa | grep -i mysql? 의 출력을 추가하십시오 .
quanta

사과. 지금 거기를 참조하십시오.
Astha

# yum remove MySQL-server?
quanta

2
교훈은 비정상적인 저장소 (remi, smartfile 등)를 비활성화 ( enabled=0in /etc/yum.repos.d/<name>.repo)하고 필요한 경우에만 활성화해야한다는 것 yum --enablerepo=<repo_name> ...입니다.
퀀타

4

rpms에서 MySQL-devel 및 MySQL-server를 수동으로 설치했으며 mysql을 설치하지 못하게했을 것입니다.

패키지를 제거하는 것이 좋습니다.

#yum remove MySQL-devel MySQL-server 

다시 설치하십시오

#yum install mysql mysql-server mysql-devel

또한 위 두 명령의 출력을 게시하면 도움이 될 것입니다.

편집하다

스마트 파일 리포지토리 .. 비활성화 하시겠습니까? 와

#yum --disablerepo=smartfile

죄송합니다. 이미 두 개의 패키지를 제거하고 내 게시물을 수정했습니다.
Gaumire

1

다음을 실행하여 MySQL 서버를 시작하십시오.

# /etc/init.d/mysql start

일반적으로 MySQL 클라이언트는 mysqlos-repository에 이름이 지정된 패키지에 있습니다 .

# yum install mysql

그러나 그것이 사실이 아니기 때문에 다른 패키지를 설치했을 것으로 생각됩니다.

할 수 있겠 니:

# yum whatprovides '/usr/bin/mysql'

MySQL 클라이언트를 제공하는 패키지 목록을 제공해야합니다.


답변 주셔서 감사하지만 내 질문을 참조하십시오. 나는 이미 이것을 시도했지만 아무 말도하지 않습니다.
Astha

죄송합니다.
Kvisle

'/ usr / bin / mysql'을 제공하는 yum의 출력 참조
Astha

1

먼저 가지고있는 것을 제거하십시오 :

yum remove mysql-server 

yum remove mysql

그런 다음 설치하십시오.

yum install mysql-server 

yum install mysql 

yum install mysql-devel



service mysqld start
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.