您好,欢迎访问一九零五行业门户网

MySQL学习笔记之进入_MySQL

bitscn.com
mysql装有一个名为mysql的命令行,在提示符下输入mysql将出现如下的简单提示:
~  mysqlwelcome to the mysql monitor.     commands end with ;     or /g.your mysql connection id is 135server version: 5.5.35-0ubuntu0.13.10.1     (ubuntu)copyright (c) 2000, 2013, oracle and/or its affiliates.     all rights reserved.oracle is a registered trademark of oracle corporation and/or itsaffiliates.     other names may be trademarks of their respectiveowners.    type 'help;' or '/h' for help. type '/c' to clear the current input statement.mysql>
mysql的命令行参数一般有:
-u 用户名
-p 密码
-h 主机名
-p 端口号
例如:mysql -u root -p -h localhost -p 3306
命令行会提示你输入密码
enter password:
也可以直接输入密码,mysql -p123456 或者mysql --password=123456
进入mysql后,show databases显示数据库信息,use database进入数据库,show tables显示table信息。
要显示某一table的列信息,show columns from table或者describe table。
其它的show用法:
show status:显示服务器信息
show grants:显示用户的权限
show errors,show warnings,显示错误或警告信息。
以上就是mysql学习笔记之进入_mysql的内容。
其它类似信息

推荐信息