課程
/數據庫
/MySQL
/與MySQL的零距離接觸
看老師說修改了數據庫編碼方式? 是utf8.。。 可能我走神了 沒看見老師怎么修改的。。。
so 該怎么修改? and 怎么修改已創建的數據庫的編碼方式?
2016-09-24
源自:與MySQL的零距離接觸 1-7
正在回答
這個你到安裝目錄下?找到一個my.ini的文件?打開并找到: [client] port=3306 [mysql] default-character-set=utf8
修改default-character-set=utf8 即可
NadiaSmile 提問者
在“C:\Program Files\MySQL\MySQL Server 8.0”路徑下沒有找到my.ini配置文件,其實可能裝在"C:\ProgramData\MySQL\MySQL Server 8.0"路徑下。
在安裝的目錄里有個文件my.ini文件,一般計算機都隱藏了后綴.ini,所以就是找到my文件,打開在
[client]
port=3306
[mysql]
default-character-set=utf8(修改)
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this?
# file.
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.5/"
#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
# 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(修改)
qq_慕碼人7512154 回復 NadiaSmile 提問者
ATLER {DATABASE | SCHEMAS} [db_name][DEFAULT] SET[=] charser_name;
舉例:ALTER DATABASE 庫名 SET = utf8;
舉報
本課程涵蓋全部MySQL數據庫的基礎,學習MySQL數據庫的基礎知識
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-09-24
修改default-character-set=utf8 即可
2020-12-25
在“C:\Program Files\MySQL\MySQL Server 8.0”路徑下沒有找到my.ini配置文件,其實可能裝在"C:\ProgramData\MySQL\MySQL Server 8.0"路徑下。
2016-10-14
在安裝的目錄里有個文件my.ini文件,一般計算機都隱藏了后綴.ini,所以就是找到my文件,打開在
[client]
port=3306
[mysql]
default-character-set=utf8(修改)
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this?
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.5/"
#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
# 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(修改)
2016-09-24
ATLER {DATABASE | SCHEMAS} [db_name][DEFAULT] SET[=] charser_name;
舉例:ALTER DATABASE 庫名 SET = utf8;