ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【MySQL】测试Windows版本的MySQL服务器是否工作

【MySQL】测试Windows版本的MySQL服务器是否工作

原创 Linux操作系统 作者:secooler 时间:2009-04-05 13:15:37 0 删除 编辑
1.查看MySQL数据库中包含那些数据库
C:\>C:\"Program Files"\MySQL\"MySQL Server 5.0"\bin\mysqlshow
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+

2.查看mysql数据库中包含哪些表
C:\>C:\"Program Files"\MySQL\"MySQL Server 5.0"\bin\mysqlshow -u root -pmysql mysql
Database: mysql
+---------------------------+
|          Tables           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+

3.查看MySQL版本信息
C:\>C:\"Program Files"\MySQL\"MySQL Server 5.0"\bin\mysqladmin version status proc
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin  Ver 8.41 Distrib 5.0.77, for Win32 on ia32
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.77-community-nt
Protocol version        10
Connection              localhost via TCP/IP
TCP port                3306
Uptime:                 9 min 54 sec

Threads: 1  Questions: 16  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.027
Uptime: 594  Threads: 1  Questions: 16  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.027
+----+------+----------------+----+---------+------+-------+------------------+
| Id | User | Host           | db | Command | Time | State | Info             |
+----+------+----------------+----+---------+------+-------+------------------+
| 10 | ODBC | localhost:2442 |    | Query   | 0    |       | show processlist |
+----+------+----------------+----+---------+------+-------+------------------+


4.使用“mysql test”测试数据库是否可以访问
C:\>C:\"Program Files"\MySQL\"MySQL Server 5.0"\bin\mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.0.77-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

-- The End --

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-584672/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE 总监,阿里云MVP,北京大学理学硕士,恩墨学院创始人,教育专家,中国区 Cloudera 首位官方授权大数据讲师,金牌培训专家,BDA大数据联盟创始人,OCM联盟创始人,ACCUG创始人、ACOUG核心专家,Blogger。

注册时间:2008-03-16

  • 博文量
    797
  • 访问量
    8039661