設置mysql編碼格式UTF-8防止中文亂碼

使用的命令 vi /etc/my.cnf //編輯my.cnf文件 i //進入插入模式 在[mysqld]下添加character_set_server=utf-8 在[mysql]下添加default-character-set=utf-8//我這個配置文件中沒有,我自己添加上去的 esc //進入命令行模式 :wq //退出保存 service mysqld restart//重啓mysql
相關文章
相關標籤/搜索