linux常用指令

来源:互联网 发布:js重量级框架 编辑:程序博客网 时间:2024/06/05 04:24

1.添加临时ip

ifconfig eth0:0 192.168.6.1 netmask 255.255.255.0 up

2.设置临时ip

ifconfig eth0 192.168.6.2 netmask 255.255.255.0

3.查看网关

netstat -r

4.查出相关进程并杀掉

kill -9 $(ps -e|grep 你的进程)

5.添加网关

route add default gw 192.168.1.10

6.允许mysql远程访问

grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;

7.连接mysql

mysql -u root -p