- -- Create Users
- -- MySQL下创建并授权用户
- -- ------------------------------------
- grant All on dbname.* to username@localhost identified by "yourpassword";
- -- 下面这条命令是MySQL5为了兼容低版本的PHP而创建的
- set password for username@localhost =old_password('yourPassword');
- flush privileges;
- -- Import/Export
- -- MySQL数据导入导出
- -- ------------------------------------
- use dbname;
- source 'filename';
- -- 导入数据,mysqldump为bin目录下面的一个命令工具
- mysqldump -u username -p dbname > "filename"
- -- Ip 授权IP访问
- -- ------------------------------------
- -- 授权
- grant all on *.* to root@'192.168.1.88' identified by 'yourpassword';
- -- 取消
- drop user root@'192.168.1.88';