Blogger Information
Blog 3
fans 0
comment 0
visits 3441
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP 获取服务器Mysql数据库信息
易风博客
Original
843 people have browsed it

一、数据库版本信息的获取方法有多种
1、使用SQL查询的方式获取:selcet version();
2、mysqli_get_server_info($link);/mysqli_get_server_version($link);

二、获取数据库大小
原理:SHOW TABLE STATUS FROM “数据库名"

array(1) {
  [0] => array(18) {
    ["Name"] => string(10) "bb_manager"
    ["Engine"] => string(6) "MyISAM"
    ["Version"] => int(10)
    ["Row_format"] => string(7) "Dynamic"
    ["Rows"] => int(1)
    ["Avg_row_length"] => int(52)
    ["Data_length"] => int(52)
    ["Max_data_length"] => string(15) "281474976710655"
    ["Index_length"] => int(2048)
    ["Data_free"] => int(0)
    ["Auto_increment"] => int(2)
    ["Create_time"] => string(19) "2017-08-06 11:59:07"
    ["Update_time"] => string(19) "2017-08-09 16:44:25"
    ["Check_time"] => NULL
    ["Collation"] => string(15) "utf8_general_ci"
    ["Checksum"] => NULL
    ["Create_options"] => string(0) ""
    ["Comment"] => string(9) "管理员"
  }
}


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post