Tag: mysql

[Q&A]mysql supports utf8mb4

my.cnf

1
2
3
4
5
6
7
8
9
10
11
[client] 
default-character-set = utf8mb4
 
[mysql] 
default-character-set = utf8mb4
 
[mysqld] 
character-set-client-handshake = FALSE 
character-set-server = utf8mb4 
collation-server = utf8mb4_unicode_ci 
init_connect='SET NAMES utf8mb4'

JDBC connector

remove characterEncoding=utf8

1
<property name="url" value="jdbc:mysql://localhost:3306/tomali?useUnicode=true&autoReconnect=true"/>
Tags : ,

[問題] mysql error 1025 (errorno: 150) 怎麼解決

alter table MY_TABLE drop foreign key my_table_ibfk_1;
alter table MY_TABLE drop column MY_COLUMN;
Tags :