新开一个虚拟机器 网上下MySQL-server-community-5.0.89-0.rhel5.i386.rpm;
MySQL-client-community-5.0.89-0.rhel5.i386.rpm;
发现失败
不知道原因?执行过程如下
[root@localhost mysql]# rpm -ivh MySQL-server-community-5.0.89-0.rhel5.i386.rpm;
warning: MySQL-server-community-5.0.89-0.rhel5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'Alternatively you can run:
/usr/bin/mysql_secure_installationwhich will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.See the manual for more instructions.Please report any problems with the /usr/bin/mysqlbug script!The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Starting MySQL......Manager of pid-file quit without updating file.[失败]
Giving mysqld 2 seconds to start
[root@localhost mysql]# rpm -ivh MySQL-client-community-5.0.89-0.rhel5.i386.rpm;
warning: MySQL-client-community-5.0.89-0.rhel5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-client-community ########################################### [100%]
[root@localhost mysql]# mysql -uroot -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost mysql]# mysqladmin -u root password 'bestbrain'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@localhost mysql]# cd /usr/bin/
[root@localhost bin]# mysqladmin -u root password 'bestbrain'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@localhost bin]# 

解决方案 »

  1.   

    应该是mysqld服务没起出来。检查一下你的进程。
      

  2.   

    root@localhost init.d]# mysql restart;
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    [root@localhost init.d]# mysql start;
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    [root@localhost init.d]# 起不起来 来。  估计安装是不成功的 。 清帮我检查, 感谢!安装过程里有The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at http://shop.mysql.com
    Starting MySQL......Manager of pid-file quit without updating file.[失败]
    Giving mysqld 2 seconds to start
    [r
    是否可以判断安装是不完全成功的 。     (我分析安装是是失败的 0
      

  3.   

     rpm -ivh  MySQL-server-community-5.1.42-0.rhel3.i386.rpmwarning: MySQL-server-community-5.1.42-0.rhel3.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
    error: Failed dependencies:
            MySQL conflicts with mysql-3.23.58-1
    [root@localhost mysql]#总是有这个冲突如何解决?
      

  4.   

    以前安装过mysql么?
    是不是没删干净
      

  5.   

    直接yum install mysql-server,否则系统自带的mysql会有冲突。
      

  6.   

    为设么能直接um install mysql-server  就可以安炸 是否所有centos 都可以这样作    (是否需要特别的设置)
    redhat 企业3好像不可以这样的 ?