Home > Database > Mysql Tutorial > OSX下完全删除MySQL和怎样使MySQL支持中文_MySQL

OSX下完全删除MySQL和怎样使MySQL支持中文_MySQL

PHP中文网
Release: 2016-05-27 14:12:41
Original
1064 people have browsed it

OSX下完全删除MySQL和怎样使MySQL支持中文_MySQL

可以在我的新页面看到这篇文章

最近在OSX下装了个最新版的MySQL,研究了一下,比如以前经常出现的中文乱码问题和完全卸载问题也遇到了,于是趁着今天闲着没事情干就把这些都谢谢,以后要用了查起来也方便,虽然我也已经放到我的Evernote里面了。

完全卸载MySQL For OSX

先停止所有MySQL有关进程:

    sudo rm /usr/local/mysql    
    sudo rm -rf /usr/local/mysql*    
    sudo rm -rf /Library/StartupItems/MySQLCOM    
    sudo rm -rf /Library/PreferencePanes/My*    
    vim /etc/hostconfig and removed the line MYSQLCOM=-YES-    
    rm -rf ~/Library/PreferencePanes/My*    sudo rm -rf /Library/Receipts/mysql*    
    sudo rm -rf /Library/Receipts/MySQL*    sudo rm -rf /var/db/receipts/com.mysql.*
Copy after login


Over.

设置中文支持

配制方法如下:
1. 拷贝/usr/local/mysql/support-files下的任意一个*.cnf文件到/etc/my.cnf

  1. 在my.cnf文件的[client]后面添加一句default-character-set=utf8

  2. 在[mysqld]后面添加如下三句:

     default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_general_ci
    Copy after login
  3. 保存退出,reboot MySQL就可以了
    以上。

  4. 以上就是OSX下完全删除MySQL和怎样使MySQL支持中文_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template