《Mysql實(shí)例Mysql 錯誤問題匯總(不斷更新中)》要點(diǎn):
本文介紹了Mysql實(shí)例Mysql 錯誤問題匯總(不斷更新中),希望對您有用。如果有疑問,可以聯(lián)系我們。
1、Mysql errono 1005 : 主外鍵不是完全一致 , 請檢查如下幾點(diǎn):
a、字段是否存在
b、類型是否一致(注意unsigned , powerdesign 生成問題)
c、數(shù)據(jù)庫引擎是否一致
d、字符編碼是否一致
e、windows平臺下注意修改lower_case_table_names = 0, windows本身不區(qū)分文件大小寫,改為0之后就區(qū)分了可能造成找不到引用的表
2、Mysql errono 121: 外鍵約束名稱重復(fù)
3、記錄 Mysql WorkBench 中單詞縮寫意義: PK: primary key (column is part of a pk)
NN: not null (column is nullable)
UQ: unique (column is part of a unique key)
AI: auto increment (the column is auto incremented when rows are inserted)
BIN: binary (if dt is a blob or similar, this indicates that is binary data, rather than text)
UN: unsigned (for integer types, see docs: “10.2. Numeric Types”)
ZF: zero fill (rather a display related flag, see docs: “10.2. Numeric Types”)
4、mysql 權(quán)限設(shè)置
//添加遠(yuǎn)程主機(jī)訪問MYSQL root權(quán)限
insert into user(host,user,password) values('%','root',PASSWORD('root'));
//root 權(quán)限授權(quán)
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
//更新權(quán)限設(shè)置
flush privileges;
5、防火墻設(shè)置
//打開端口
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
//保存
/etc/rc.d/init.d/iptables save
//查看狀態(tài)
/etc/init.d/iptables status
6、開機(jī)自動運(yùn)行(實(shí)現(xiàn)類似Windows服務(wù))
/sbin/chkconfig --level 2345 mysqld on
/sbin/chkconfig --list
結(jié)果如下:
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
轉(zhuǎn)載請注明本頁網(wǎng)址:
http://www.fzlkiss.com/jiaocheng/3460.html