help> 插入数据:insert into tb_name (col1,clo2...) values|value ('string',num...);
replace into 替换
修改数据:update tb_name set com='value' where col1='';
删除数据:delete from tb_name where
选择
select 字段 from tb_name where 条件;
*:表示所有字段
where:没有where表示所有行
创建用户:create user 'username'@'host'> 删除用户:drop user 'username'@'host';
用户授权:grant 权限 on db_name.tb_name to 'username'@'host' [identified by 'password'];
查看用户权限:show grant for 'username'@'';
为用户设定密码
1、set password for 'username'@'host'=PASSWORD('password');
flush privileges;刷新
2、#mysqladmin -uusername -hhost -p PASSWORD'password';
3、update user set password=PASSWORD('password') where user='username'
论坛
discuz
phpwind
phpbb
cms
drupal
joomla
wordpress 个人博客系统
mysql服务器维护了两类变量
服务器变量:
定义mysql服务器运行特性:show global variables like "";
状态变量:
保存了mysql服务器运行统计数据:show global status like "";