Cannot store UTF8 characters in MySQL

前端 未结 6 1140
抹茶落季
抹茶落季 2021-01-06 14:38

Cannot find the reason why I am unable to store in a MySQL database characters like ţ, î, ş.

My table definition is:

CREATE TABLE IF NOT EXISTS `gen_         


        
6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-06 15:16

    Check your MySQL initialization file. It should include these character-set lines:

    [client]
    port=3306
    
    [mysql]
    default-character-set=utf8
    port = 3306
    #
    [mysqld]
    basedir=".....
    #Path to the database root
    datadir=".....
    # The default character set that will be used when a new schema or table is
    # created and no character set is defined
    character-set-server=utf8
    

提交回复
热议问题