登录数据库: mysql -u root -p 回车输入数据库密码
执行数据库脚本:source /opt/cnip.sql
字符串连接: concat(n1,n2,......)
导出数据库:sqldump -u root -p cnip > /opt/cnip.sql,回车后输入数据库密码
导出查询结果:select * from cnip t where t.enable_flag = 'T' limit 0,50 into outfile '/opt/rh/cnip.sql';
如果出现异常:Can't create/write to file '/opt/rh/cnip.sql' (Errcode: 13 - Permission denied)
chmod 777 rh授权所有权限
启动/停止数据库: /etc/init.d/mysqld start/stop