Unable to query with Chinese character
Hello everyone,
I'm new to MySQL so I was practicing with a MySQL tutorial
There was a question in this tutorial requiring us to query a record using LIKE operator so I did it as:
select
Tname
from Teacher
where Tname like '李%';
and the result was Tname: (nothing showed up except the column name).
(All databases and tables in this tutorial was set to utf8 before any query was performed)
Some suggested me to set the encoding in the configuration file (my.cnf) into utf8 and so I add:
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8
in the my.cnf file and apply it in the system preference panel.
However, it does't work at all.
Could somebody please show me a way out of this?
Thank you so much.
Subject
Views
Written By
Posted
Unable to query with Chinese character
1264
January 08, 2021 03:32AM
577
January 08, 2021 03:37AM
600
January 08, 2021 09:17AM
456
July 05, 2021 02:25AM
532
July 05, 2021 01:11PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.