监控mysql服务
在node4上安装mysql-server
# yum install mysql-server -y
启动mysqld服务
# service mysqldstart
Initializing MySQLdatabase: Installing MySQL systemtables...
OK
Filling helptables...
OK
To start mysqld atboot time you have to copy
support-files/mysql.serverto the right place for your system
PLEASE REMEMBER TOSET A PASSWORD FOR THE MySQL root USER !
To do so, start theserver, then issue the following commands:
Alternatively you canrun:
/usr/bin/mysql_secure_installation
which will also giveyou the option of removing the test
databases andanonymous user created by default. Thisis
strongly recommendedfor production servers.
See the manual formore instructions.
You can start theMySQL daemon with:
cd /usr ;/usr/bin/mysqld_safe &
You can test theMySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ;perl mysql-test-run.pl
Please report anyproblems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]
# chkconfig mysqld on
然后给mysql设置管理员密码
# mysqladmin -u root -p password wiker #修改密码为wiker
Enter password: #直接回车,默认的root密码是空
[root@node4 ~]# mysql -u root -pwiker #测试下登陆
Welcome to the MySQLmonitor. Commands end with ; or \g.
Your MySQL connectionid is 11
Server version:5.1.52 Source distribution
Copyright (c) 2000,2010, Oracle and/or its affiliates. All rights reserved.
This software comeswith ABSOLUTELY NO WARRANTY. This is free software,
and you are welcometo modify and redistribute it under the GPL v2 license
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.