Home > Database > Mysql Tutorial > MYSQL命令行小技巧_MySQL

MYSQL命令行小技巧_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:38:54
Original
1055 people have browsed it

bitsCN.com


MYSQL命令行小技巧

 

MYSQL 连接方式

1 先登录数据库 再查询

#mysql -uroot -p -hlocalhost

Enter Password:

mysql>use mysql;

Database changed

mysql>select user from user;

 

2 不进入MYSQL DB直接进行查询工作

#mysql -uroot -p -e"select user from user;" user

Enter Password:

+------+

| user |

+------+

| root |

| root |

+------+

 

回滚和提交事物命令

commit;

rollback;
 

bitsCN.com
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template