MYSQL-默认用户
原创woxuewangluo 博主文章分类:MYSQL文档 ©著作权
©著作权归作者所有:来自51CTO博客作者woxuewangluo的原创作品,请联系作者获取转载授权,否则将追究法律责任
1、查询本地用户:
mysql> use mysql
Database changed
mysql> select user,host from user;
+--------+---------------+
| user | host |
+--------+---------------+
| backup | % |
| test | % |
| root | 127.0.0.1 |
| root | 192.168.1.125 |
| root | ::1 |
| | localhost |
| root | localhost |
| test | localhost |
| wang | localhost |
+--------+---------------+
9 rows in set (0.00 sec)
可以看出有个一host是localhost空的user,可以试着登陆:
C:\Documents and Settings\Administrator>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.25-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
可以登陆!!
2、查看可以使用的数据库:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
3、我们试着使用一些这个test数据库:
mysql> use test;
Database changed
再试着对其操作:
mysql> select * from user;
+--------+-----------------+
| name | password |
+--------+-----------------+
| admin | 123 |
| admin1 | 123 |
| admin2 | 123 |
| admin3 | 321 |
| wang | 231 |
| 1 |
前一篇:ACID特性
< 前一篇ACID特性
后一篇 >MYSQL-innodb存储引擎配置
下一篇:ACID特性
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章