SET SQL_SAFE_UPDATES = 0;
'ALTER TABLE `account_category` auto_increment = 1;
查看所有用户
select user,host,password from mysql.user;
查看用户权限
show grants for 用户
远程访问数据库权限设置
GRANT USAGE ON *.* TO 'user'@'%' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9'
GRANT ALL PRIVILEGES ON `table_sample`.* TO 'user'@'%'
修改用户权限:
update mysql.user set password = password("user") where mysql.user.user = "user";
flush privileges;
修改表的字段名称
alter table` table_name` change `a1` `a2` text;
修改表名:
//alter table 表名 rename to 新表名
alter table `table_name` rename to `table_another_name`
//修改字段类型
alter table interest_table modify interest_field varchar(10000);
//安装mysql数据库后:
在mysql的配置文件中,修改
[client]
default-character-set=utf-8
[mysqld]
character_set_server=utf8 (5.5版本的使用这个)