数据库操作

Posted by ccsong on October 7, 2016

系统编码问题

  • mac编码问题,存入数据库存在编码问题:需要统一设置编码,设置好编码后建表不会出现中文乱码不识别现象。

    cmd
    mysql
    show variables like "%char%";
    set character_set_database=utf8;
    
  • root模式进入查看

    mysql -u root -p
    show databases;
    

Creative Commons License
This work is licensed under a CC A-S 4.0 International License.