云监控
直接root帐号执行以下命令,回车即可:
64位
wget -e 'http_proxy=hzcmsproxy.aliyun.com:3128' -O /tmp/cloudmonitor.tar.gz 'http://cms-download.aliyun.com/release/1.1.24/linux64/agent-linux64-1.1.24-package.tar.gz' &&
mkdir /usr/local/cloudmonitor &&
tar -xf /tmp/cloudmonitor.tar.gz -C /usr/local/cloudmonitor &&
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh install &&
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh start
32位
wget -e 'http_proxy=hzcmsproxy.aliyun.com:3128' -O /tmp/cloudmonitor.tar.gz 'http://cms-download.aliyun.com/release/1.1.24/linux32/agent-linux32-1.1.24-package.tar.gz' &&
mkdir /usr/local/cloudmonitor &&
tar -xf /tmp/cloudmonitor.tar.gz -C /usr/local/cloudmonitor &&
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh install &&
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh start
查看运行状态
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh status
重启
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh restart
卸载
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh remove && rm -rf /usr/local/cloudmonitor
mysql 添加
1.查看linux防火墙是否开放3306端口
执行
iptables -nL --line-number
[图片上传失败...(image-c0d4ca-1530369654363)]这里显示DROP代表防火墙阻止了3306端口。
2.添加防火墙例外
执行
vim /etc/sysconfig/iptables
[图片上传失败...(image-9c9676-1530369654363)]
3.重启防火墙
执行
service iptables restart
查看是否变为ACCEPT
4.创建远程连接用户并授权
mysql> select Host,User,Password from mysql.user;
+----------------+------------------+-------------------------------------------+
| Host | User | Password |
+----------------+------------------+-------------------------------------------+
| localhost | root | *836E233974EBE6EA32F95F890A91363F8427F78B |
| iz94926clkiz | root | *836E233974EBE6EA32F95F890A91363F8427F78B |
| 127.0.0.1 | root | *836E233974EBE6EA32F95F890A91363F8427F78B |
| ::1 | root | *836E233974EBE6EA32F95F890A91363F8427F78B |
| localhost | debian-sys-maint | *1460ED3535ABDBB887F9E5F57F40A2354610CDF3 |
+----------------+------------------+-------------------------------------------+
rows in set (0.00 sec)
创建用户
create user test identified by '123456';
+----------------+------------------+-------------------------------------------+
| Host | User | Password |
+----------------+------------------+-------------------------------------------+
| localhost | root | *836E283974EBE6EA32F95F890A91363F8427F78B |
| iz949s6clkiz | root | *836E283974EBE6EA32F95F890A91363F8427F78B |
| 127.0.0.1 | root | *836E283974EBE6EA32F95F890A91363F8427F78B |
| ::1 | root | *836E283974EBE6EA32F95F890A91363F8427F78B |
| localhost | debian-sys-maint | *1460ED35E5ABDBB887F9E5F57F40A2354610CDF3 |
| % | test | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+----------------+------------------+-------------------------------------------+
rows in set (0.00 sec)
授权
grant all privileges on *.* to 'test'@'%'identified by '123456' with grant option;
flush privileges;
修改用户密码
update mysql.user set password=password('新密码') where User="test" and Host="localhost";
删除用户
delete from user where User='test' and Host='localhost';