zoukankan      html  css  js  c++  java
  • 获得表字段数量

     ##### 获得表的字段数量
    mysql> select count(1) from information_schema.columns where table_schema = 'mysql' and table_name='user';
    +----------+
    | count(1) |
    +----------+
    | 45 |
    +----------+
    1 row in set (0.00 sec)
    
    mysql>
    
    ###########查询服务器是否支持ssl功能
    mysql> show variables like 'have_openssl';
    +---------------+----------+
    | Variable_name | Value |
    +---------------+----------+
    | have_openssl | DISABLED |
    +---------------+----------+
    1 row in set, 1 warning (0.01 sec)
    
    mysql>
    ######按照加密后的密码给用户密码,前提是你知道这个加密前的原密码,而且密码格式和位数要满足规则。
    比如将明文密码"123456"加密后的密码为"*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9"。
     create user 'glc'@'localhost' identified by password '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' ;

     

    #修改root密码
    C:Usersigoodful>mysqladmin -u root -p password "123456" Enter password: ****** mysqladmin: [Warning] Using a password on the command line interface can be insecure. Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety. C:Usersigoodful>
  • 相关阅读:
    HDU What Are You Talking About
    谷歌面试题
    POJ 2299 UltraQuickSort
    单链表排序
    HDU Hat’s Words
    C++ const关键字
    求二叉树任意两点间的距离
    HDU Phone List
    POJ 2352 Stars
    C++ volatile关键字
  • 原文地址:https://www.cnblogs.com/igoodful/p/11628392.html
Copyright © 2011-2022 走看看