您的位置:首页 > 运维架构 > Tomcat

mysql tomcat常用命令

2013-07-05 08:29 197 查看
SSH Secure Shell 3.2.0 (Build 267)

Copyright (c) 2000-2002 SSH Communications Security Corp - http://www.ssh.com/
This copy of SSH Secure Shell is a non-commercial version.

This version does not include PKI and PKCS #11 functionality.

Last login: Fri May 17 19:40:06 2013 from 192.168.100.253

[root@node11 ~]#   cd /www/wdlinux/mysql-5.1.63/bin                //

[root@node11 bin]# mysql -uroot -p                                 //登录

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 9732

Server version: 5.1.63 Source distribution

Copyright (c) 2000, 2011, 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.

Last login: Thu May 23 09:40:01 2013 from 192.168.100.253

[root@node11 ~]# cd /www/wdlinux/mysql-5.1.63/bin;

[root@node11 bin]#  mysqldump -u root -p easyssh < easyssh523.sql;     //还原

[root@node11 bin]#  mysqldump -u root -p easyssh > easyssh523.sql;    //备份

mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| easyssh            |

| jpkc               |

| mysql              |

| test               |

+--------------------+

5 rows in set (0.00 sec)

mysql> use easyssh;

Database changed

mysql> show tables;

show full columns from equipment;

ALTER TABLE tuser CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;    utf8_general_ci

Last login: Fri May 17 10:51:06 2013 from 192.168.100.253

[root@node11 ~]# cd /usr/apache-tomcat-6.0.36

[root@node11 apache-tomcat-6.0.36]# bin/shutdown.sh          //关闭tomcat

Using CATALINA_BASE:   /usr/apache-tomcat-6.0.36

Using CATALINA_HOME:   /usr/apache-tomcat-6.0.36

Using CATALINA_TMPDIR: /usr/apache-tomcat-6.0.36/temp

Using JRE_HOME:        /usr/java/jdk1.6.0_38

Using CLASSPATH:       /usr/apache-tomcat-6.0.36/bin/bootstrap.jar

[root@node11 apache-tomcat-6.0.36]# ps -ef | grep tomcat                            //查看tomcat状态

root      2848     1  0 10:24 ?        00:01:44 /usr/java/jdk1.6.0_38/bin/java -Djava.util.logging.config.file=/usr/apache-tomcat-6.0.36/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/apache-tomcat-6.0.36/endorsed
-classpath /usr/apache-tomcat-6.0.36/bin/bootstrap.jar -Dcatalina.base=/usr/apache-tomcat-6.0.36 -Dcatalina.home=/usr/apache-tomcat-6.0.36 -Djava.io.tmpdir=/usr/apache-tomcat-6.0.36/temp org.apache.catalina.startup.Bootstrap start

root      5206  5078  0 17:47 pts/1    00:00:00 grep tomcat

[root@node11 apache-tomcat-6.0.36]# kill -9 2848                                     //查杀进程

[root@node11 apache-tomcat-6.0.36]# ps -ef | grep tomcat

root      5208  5078  0 17:48 pts/1    00:00:00 grep tomcat

[root@node11 apache-tomcat-6.0.36]# bin/startup.sh                                   //启动tomcat

Using CATALINA_BASE:   /usr/apache-tomcat-6.0.36

Using CATALINA_HOME:   /usr/apache-tomcat-6.0.36

Using CATALINA_TMPDIR: /usr/apache-tomcat-6.0.36/temp

Using JRE_HOME:        /usr/java/jdk1.6.0_38

Using CLASSPATH:       /usr/apache-tomcat-6.0.36/bin/bootstrap.jar

[root@node11 apache-tomcat-6.0.36]#

Last login: Mon May 20 18:21:42 2013 from 192.168.100.253

[root@node11 ~]# cd /usr/apache-tomcat-6.0.36/logs    //选中log

[root@node11 logs]#

tail -f /usr/apache-tomcat-6.0.36/logs/catalina.out;   //查看tomcat控制台信息
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: