mysql installato ma non funzionante


9

ho installato mysql mysql-devel mysql-server rimuovendo quello precedente. ho usato i comandi come

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

dice

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

poi ho provato a individuarlo, così ho fatto

# 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

così dopo aver cercato ho trovato questa pagina così ho fatto

rpm -V mysql

ma dice

# rpm -V mysql
package mysql is not installed

anche fatto

# service mysqld start

ma l'output è stato

  mysqld: unrecognized service

così ho provato a installarlo di nuovo, yum install mysqlma questa volta l'output è

 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

per favore guidami dove sto sbagliando. quale dovrebbe essere l'approccio corretto per fare questo?

EDIT Sono su centos5 e

init.d fa vedere questo file 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

L'ho fatto

# 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

MODIFICATO

# 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

ogni volta che yum install mysql mysql-server mysql-devello faccio installa solo mysql-server e mysql-devel non mysql. e se solo io yum install mysqllo faccio , dice:

 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

e

#  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

MODIFICA ANCORA

# 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

ogni volta che yum install mysql mysql-server mysql-devello faccio dice

# 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]:

significa solo mysql-server e mysql-devel non il terzo che è mysql.

AGGIORNATO

 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
-------------

AGGIORNAMENTO FINALE

# 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

Quale versione di CentOS è questa? Dov'è la tua directory /etc/init.d-?
Kvisle

per favore, vedi la modifica
Astha,

Quello che ha detto Shane.
Kvisle

@Kvisle, per favore, vedi la mia modifica
Astha,

Risposte:


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

Sembra che tu abbia scaricato il MySQL-serverpacchetto dalla homepage e installato con rpm -ivh. Verifica con:

$ rpm -qa | grep MySQL

Se si desidera installare mysql-serverdal repository (base, epel, ...), è necessario disinstallare il MySQL-serverprimo eseguendo:

# yum remove MySQL-*

e poi:

# yum install mysql mysql-server mysql-devel

Lo script init dal MySQL-serverpacchetto è mysqlinvece di mysqldda mysql-server. Il suggerimento per te è digitare alcuni caratteri ( /etc/init.d/mys) e premere Tabo TabTab.


quando installo mysql installa automaticamente mysql-server al posto di mysql. vedi la mia modifica.
Astha,

Non ho visto la tua modifica. Aggiungi l'output di rpm -qa | grep -i mysql?
quanta

scuse. vedi che è lì adesso.
Astha,

# yum remove MySQL-server?
quanta

2
La lezione è che dovresti disabilitare ( enabled=0in /etc/yum.repos.d/<name>.repo) il repository insolito (remi, smartfile, ...) e abilitare solo quando necessario yum --enablerepo=<repo_name> ....
quanta

4

Probabilmente hai installato MySQL-devel e MySQL-server manualmente da rpms e ti impediscono di installare mysql.

Meglio rimuovere quei pacchetti con

#yum remove MySQL-devel MySQL-server 

e installarlo di nuovo con

#yum install mysql mysql-server mysql-devel

Pubblica inoltre l'output di entrambi i comandi sopra, che ci aiuterebbe ad aiutarti.

MODIFICARE

Il repository smartfile .. provare a disabilitarlo? con

#yum --disablerepo=smartfile

scusa, visto che hai già rimosso i due pacchetti, modificato il mio post in conformità.
Gaumire,

1

Si avvia il server MySQL eseguendo:

# /etc/init.d/mysql start

Normalmente, il client MySQL si trova nel pacchetto denominato mysqlnel repository os:

# yum install mysql

Ma dal momento che non è il tuo caso, sospetto che tu abbia installato un pacchetto diverso.

Puoi provare:

# yum whatprovides '/usr/bin/mysql'

Dovrebbe darti un elenco di pacchetti che ti forniscono il client MySQL.


grazie per la risposta, ma per favore signore, vedi la mia domanda. l'ho già provato ma non dice nulla da fare.
Astha,

Mi scuso, aggiornato
Kvisle il

vedere l'output di yum whatprovides '/ usr / bin / mysql'
Astha,

1

Per prima cosa rimuovi quello che hai:

yum remove mysql-server 

yum remove mysql

Quindi installare:

yum install mysql-server 

yum install mysql 

yum install mysql-devel



service mysqld start
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.