[root@cdh1 linuxidc]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connectionid is 2
Server version:5.1.73 Source distribution
Copyright (c)2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye
9、设置mysql开机启动
[root@cdh1 linuxidc]# chkconfig mysqld on
10、开启3306端口,并保存
[root@cdh1 linuxidc]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT [root@cdh1 linuxidc]# /etc/rc.d/init.d/iptables save
11、连接mysql设置密码