日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 查询系统_使用select和show命令查看mysql数据库系统信息

發(fā)布時間:2023/12/1 数据库 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 查询系统_使用select和show命令查看mysql数据库系统信息 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

(1).select

顯示當前日期和時間

mysql> select now();

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

| now() |

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

| 2019-06-05 13:46:20 |

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

1 row in set (0.00 sec)

顯示當前日期

mysql> select curdate();

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

| curdate() |

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

| 2019-06-05 |

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

1 row in set (0.04 sec)

顯示當前時間

mysql> select curtime();

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

| curtime() |

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

| 13:48:15 |

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

1 row in set (0.00 sec)

顯示當前所在數(shù)據(jù)庫

mysql> use test_db;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> select database();

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

| database() |

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

| test_db |

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

1 row in set (0.00 sec)

顯示Mysql版本

mysql> select version();

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

| version() |

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

| 5.7.16 |

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

1 row in set (0.00 sec)

顯示當前用戶

mysql> select user();

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

| user() |

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

| root@localhost |

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

1 row in set (0.00 sec)

(2).show

show variables;顯示變量

show global variables;顯示全局變量

show global variables like '%version%';顯示版本信息

mysql> show global variables like '%version%';

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

| Variable_name | Value |

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

| innodb_version | 5.7.16 |

| protocol_version | 10 |

| slave_type_conversions | |

| tls_version | TLSv1,TLSv1.1 |

| version | 5.7.16 |

| version_comment | MySQL Community Server (GPL) |

| version_compile_machine | x86_64 |

| version_compile_os | Linux |

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

8 rows in set (0.00 sec)

show variables like '%storage_engine%';顯示默認的存儲引擎

mysql> show variables like '%storage_engine%';

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

| Variable_name | Value |

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

| default_storage_engine | InnoDB |

| default_tmp_storage_engine | InnoDB |

| disabled_storage_engines | |

| internal_tmp_disk_storage_engine | InnoDB |

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

4 rows in set (0.00 sec)

總結(jié)

以上是生活随笔為你收集整理的mysql 查询系统_使用select和show命令查看mysql数据库系统信息的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。