mysql操作手册
版本:5.6.16mysql linux安装基本步骤:#rpm -e --nodeps mysql-lib-5.1.*#rpm -ivh mysql-server#rpm -ivh mysql-clientmysql 初始密码/root/.mysql_secretmysql默认启动#service mysql start#service mysql status#chkconfig --list#chkconfig mysql on#mysql -u root -pmysql 修改密码mysql>set password for root@localhost = password('123456'); || mysql>SET PASSWORD = PASSWORD('123456');mysql>flush privileges;mysql 不区分大小写(注:建库之前指定)vi my.cnflower_case_name_tables=1;mysql 允许任何ip登录UPDATE user SET Host = '%' WHERE Host= '127.0.0.1'; mysql 登录指定数据库服务器mysql -h 10.10.10.100 -u root -pmysql 倒库备份$mysqldump -uroot -p database_name > database_name; --导出$source database_name; --导入mysql 忘记root密码时$sudo mysqld_safe --skip-grant-tables&mysql>use mysql;mysql>update user set password=password('123456') where user='root';mysql 为用户分配权限mysql>GRANT ALL PRIVILEGES ON database.* TO 'root'@'10.10.10.100' IDENTIFIED BY '123456';mysql>flush privileges;mysql 查询时间毫秒数转日期select FROM_UNIXTIME(START_TIME/1000,'%Y-%m-%d %h:%i:%s');