Solution:
Step 1: the database and table created during restoration are in utf8 format (utf8 is recommended, of course, either gbk or gb2312)
Copy codeThe Code is as follows:
Create database 'shegongku 'default character set utf8
Create table 'members '(
'Uid' mediumint (8) unsigned not null default '0 ',
'Username' varchar (15) not null default '',
'Password' varchar (40) not null default '',
'Salt' varchar (16) default NULL,
'Email 'varchar (60) not null default''
) ENGINE = MyISAM default charset = utf8;
Second, convert the encoding of the SQL file to utf8 format. You can use notepad2 or UltraEditor to convert the file, and then add a set names utf8 row to the first SQL file to save the file.
Part 3: import. In general, there will be no garbled characters. If you find the garbled characters again in the terminal cmd, this is not a database problem, but a display problem. Enter set names gbk in the terminal, in this way, Chinese characters are displayed normally.