Get list of MySQL databases, and server version?

前端 未结 3 1298
夕颜
夕颜 2021-01-15 16:58

My connection string for MySQL is:

\"Server=localhost;User ID=root;Password=123;pooling=yes;charset=utf8;DataBase=.;\"

My questions are :

3条回答
  •  轮回少年
    2021-01-15 17:33

    show Databases; 
    

    Will return you all the registered databases.

    And

    show variables;
    

    will return a bunch of name value pairs, one of which is the version number.

提交回复
热议问题