日期:2014-05-16 浏览次数:20904 次
UTF-8编码的数据库,如果希望汉字字段按照拼音排序:
SELECT * FROM students ORDER BY CONVERT( name USING gbk ) ;
?原文地址:http://blog.csdn.net/stephenxu111/archive/2009/08/11/4436181.aspx
?
?
数据库备份:
?
#mysqldump最常用于备份一个整个的数据库: shell> mysqldump -u username -p --opt db_name > backup-file.sql #你可以这样将转储文件读回到服务器: shell> mysql -u username -p db_name < backup-file.sql?
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';??
GRANT ALL ON database_name.* TO 'username'@'localhost';
show grants; show grants for username; show grants for username@localhost;
set password for username@’localhost’ = password(‘newpassword’); flush privileges;
revoke all on *.* from sss@localhost ;
use mysql delete from user where user='name' and host='localhost' ; flush privileges ;?