获得表字段数量

 

 ##### 获得表的字段数量
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:\Users\igoodful>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:\Users\igoodful>

 

posted @ 2019-10-06 20:50  igoodful  阅读(387)  评论(0编辑  收藏  举报