[root@CentOS mysql]# binmysqladmin -u root password job100
红色标注密码
让MySQL自动启动
进入安装目录
[root@centos mysql]# cd homexulemysql-5.0.22
[root@centos mysql-5.0.22]# cp support-filesmysql.server etcrc.dinit.dmysql
[root@centos mysql-5.0.22]# chmod +x etcrc.dinit.dmysql
[root@centos mysql-5.0.22]# chkconfig --level 3 --add mysql
查看MYSQL运行状态
[root@centos bin]# usrlocalmysqlbinmysqladmin -u root -p version proc
Enter password
usrlocalmysqlbinmysqladmin Ver 8.41 Distrib 5.0.22, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.0.22-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket tmpmysql.sock
Uptime 33 min 3 sec
Threads 1 Questions 5 Slow queries 0 Opens 0 Flush tables 1 Open tables 6 Queries per second avg 0.003
+----+------+-----------+----+---------+------+-------+------------------+
Id User Host db Command Time State Info
+----+------+-----------+----+---------+------+-------+------------------+
2 root localhost Query 0 show processlist
+----+------+-----------+----+---------+------+-------+------------------+
