最郁闷的问题之mysql 高手快来 {~_~!~_~}

最郁闷的问题之mysql 高手快来 {~_~!~_~}

[root@localhost mysql]# rpm -ivh --force MySQL-server-4.0.21-0.i386.rpm
warning: MySQL-server-4.0.21-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
Installing all prepared tables
060424  8:14:35 Warning: Asked for 196608 thread stack, but got 126976
060424  8:14:35 /usr/sbin/mysqld: Shutdown Complete


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'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

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 https://order.mysql.com

[root@localhost mysql]# rpm -ivh --force MySQL-client-4.0.21-0.i386.rpm
warning: MySQL-client-4.0.21-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@localhost mysql]# rpm -ivh --force MySQL-devel-4.0.23-0.i386.rpm
warning: MySQL-devel-4.0.23-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-devel            ########################################### [100%]
[root@localhost mysql]# rpm -ivh --force MySQL-shared-4.0.23-0.i386.rpm
warning: MySQL-shared-4.0.23-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-shared           ########################################### [100%]
[root@localhost mysql]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

疑问:就是启动不了,我是在redhat4.2下安装的,把过去的mysql4.1卸载了
rpm -qa |grep mysql
出现俩包   mysql    和mysql-client包
卸载mysql时有依赖包  rpm -e --nodeps mysql  
然后安装就出现问题了   但是经常是这样安装的  有时就能过去。
高手赐教~~~
启动方法都试了  不行  /etc/initd/mysql start   service mysqld start
  在sbin里启动时 出现060424数字 在安装service 时也会出现。到底是什么?〉
  [root@localhost mysql]# /usr/sbin/mysqld start
060424  8:43:22 Warning: Asked for 196608 thread stack, but got 126976
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
060424  8:43:22 Aborting

060424  8:43:22 /usr/sbin/mysqld: Shutdown Complete
[root@localhost src]# rpm -ivh MySQL-server-4.0.21-0.i386.rpm
warning: MySQL-server-4.0.21-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f
5
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
060424  9:56:58 Warning: Asked for 196608 thread stack, but got 126976
060424  9:56:58 /usr/sbin/mysqld: Shutdown Complete


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'
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 https://order.mysql.com

[root@localhost src]# rpm -ivh MySQL-client-4.0.21-0.i386.rpm
warning: MySQL-client-4.0.21-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f
5
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@localhost src]# rpm -ivh MySQL-devel-4.0.23-0.i386.rpm
warning: MySQL-devel-4.0.23-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-devel            ########################################### [100%]
[root@localhost src]# rpm -ivh MySQL-shared-4.0.23-0.i386.rpm
warning: MySQL-shared-4.0.23-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f
5
Preparing...                ########################################### [100%]
   1:MySQL-shared           ########################################### [100%]
[root@localhost src]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.21-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

对照看下  郁闷啊
一定要找出此类原因,收集此类问题答案??????
原因是由于卸载包的时候出现包的依赖,删除了,破坏了一个文件
  就是在/var/lib/mysql下  一个有个mysql.sock粉红色的
  没有就启动不了mysql   
   遇到这种问题  首先查看/var/lib/mysql有没有mysql.sock这个文件
  没有重起下机器在查看。我的就是这么好的~~~
就 四个rpm包
兄弟详细看下
[root@localhost mysql]# rpm -ivh --force MySQL-server-4.0.21-0.i386.rpm
[root@localhost mysql]# rpm -ivh --force MySQL-client-4.0.21-0.i386.rpm
[root@localhost mysql]# rpm -ivh --force MySQL-devel-4.0.21-0.i386.rpm
[root@localhost mysql]# rpm -ivh --force MySQL-shared-4.0.21-0.i386.rpm
[root@localhost mysql]#mysql
mysql操作
show databases;   //显示数据库
create database shenhua  //创建数据库shenhua
use shenhua            //链接shenhua数据库
show tables;     //显示表
select * from 表名
Dorp shenhua    //删除数据库
\../ shenhua.sql    //导入数据库