日期:2014-05-16  浏览次数:20841 次

mysql 5.5的配置
字符编码:
、重命名my-huge.ini为my.ini,在[client]下面添加default-character-set=utf8,在[mysqld]下面添加character_set_server = utf8;
2、添加PATH环境变量:d:\mysql(目录因人而异);把mysql添加为windows服务,在命令行输入mysqld -install,启动命令net start mysql,停止命令net stop mysql;
3命令行输入show variables like 'character\_set\_%';显示
+--------------------------+--------+
| Variable_name            | Value  |
+--------------------------+--------+
| character_set_client     | utf8   |
| character_set_connection | utf8   |
| character_set_database   | utf8   |
| character_set_filesystem | binary |
| character_set_results    | utf8   |
| character_set_server     | utf8   |
| character_set_system     | utf8   |
+--------------------------+--------+
7 rows in set (0.00 sec)

解决ERROR 1045 (28000): Access denied for user 'root'@'localhost:
直接用mysql -uroot
登录进去之后
GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' identified by '密码';