启动mysql服务
/etc/init.d/mysql start
-p指的的连接数据库的密码
mysql -h 127.0.0.1 -u root -proot
在命令行中连接数据库
desc tablename;查看表的信息
show cerate table 表名;显示建表语句
explain sql语句;查看执行sql语句的各种信息
启动mysql服务
/etc/init.d/mysql start
-p指的的连接数据库的密码
mysql -h 127.0.0.1 -u root -proot
在命令行中连接数据库
desc tablename;查看表的信息
show cerate table 表名;显示建表语句
explain sql语句;查看执行sql语句的各种信息