一、mysql的启动、停止和重启
/etc/init.d/mysql start
/etc/init.d/mysql stop
/etc/init.d/mysql restart
二、进入mysql
mysql -u root -p
三、mysql基本命令使用
//查询所有数据库 show databases; //进入数据库 use xxx; //查看所有表 show tables; //增、删、改、查 //暂时略过 //查询内容存为文件 into outfile select * FROM TABLENAME INTO outfile 'TEST.TXT'
//将查询的字段存储到另一张表
"insert into text2(text) select text from `wb_sina2013-05` where text REGEXP '{$str}' "