zoukankan      html  css  js  c++  java
  • Linux 常用命令,处理端口和Tomcat,mysql

    查看端口占用

    1、lsof -i:端口号

    2、netstat -tunlp|grep 端口号

    都可以查看指定端口被哪个进程占用的情况

    kill -9 进程号    强制结束进程

    启动

    1、使用 service 启动:service mysqld start
    2、使用 mysqld 脚本启动:/etc/inint.d/mysql start
    3、使用 safe_mysqld 启动:safe_mysql&

    停止
    1、使用 service 启动:service mysqld stop
    2、使用 mysqld 脚本启动:/etc/inint.d/mysql stop
    3、mysqladmin shutdown

    重启
    1、使用 service 启动:service mysqld restart
    2、使用 mysqld 脚本启动:/etc/inint.d/mysql restart

    查看mysql状态

    >>mysql

     

    #停止firewall

    systemctl stop firewalld.service

     

    #开启firewall

    systemctl start firewalld.service

     

    #禁止firewall开机启动

    systemctl disable firewalld.service

     

    mysql 忘记密码:

    vi /etc/my.cnf

    在[mysqld]的段中加上一句:skip-grant-tables 保存并且退出vi

    修改mysql下密码:

    update mysql.user set authentication_string=password('root') where user='root' ;

  • 相关阅读:
    CF1119H
    oracle 第06章 数据字典
    oracle col命令
    oracle 第05章 SQL语句
    oracle 第04章 字符集
    oracle 第03章 体系结构
    oracle 第02章 基本操作
    oracle 第01章 安装
    oracle启动、关闭、重启脚本
    第十一周-学习进度条
  • 原文地址:https://www.cnblogs.com/ITyunbook/p/10628044.html
Copyright © 2011-2022 走看看