日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

Mysql 常見(jiàn)問(wèn)題匯總_MySQL教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:從mysql中導(dǎo)出單個(gè)表結(jié)構(gòu)和數(shù)據(jù)
mysqldump -u用戶(hù)名 -p密碼 -P端口號(hào) --database 數(shù)據(jù)庫(kù)名 --tables 表名 c:/導(dǎo)出文件名.sql 1、其中參數(shù)-P可以省略除非你的端口號(hào)不是mysql默認(rèn)端口號(hào) 2、如果不寫(xiě)--tables參數(shù)就是導(dǎo)出去該DB中的全部表數(shù)據(jù) 1)MYSQL連接命令: mysql -h主機(jī)地址 -u用戶(hù)名 -p用戶(hù)密碼

  1、Mysql errono 1005 : 主外鍵不是完全一致 , 請(qǐng)檢查如下幾點(diǎn):

      a、字段是否存在 
      b、類(lèi)型是否一致(注意unsigned , powerdesign 生成問(wèn)題)
      c、數(shù)據(jù)庫(kù)引擎是否一致
      d、字符編碼是否一致
      e、windows平臺(tái)下注意修改lower_case_table_names = 0, windows本身不區(qū)分文件大小寫(xiě),改為0之后就區(qū)分了可能造成找不到引用的表  

2、Mysql errono  121:  外鍵約束名稱(chēng)重復(fù) 

3、記錄 Mysql WorkBench 中單詞縮寫(xiě)意義:
      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ī)訪(fǎng)問(wèn)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è)置
      //打開(kāi)端口
      /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、開(kāi)機(jī)自動(dòng)運(yùn)行(實(shí)現(xiàn)類(lèi)似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

分享:mysql 數(shù)據(jù)庫(kù) (基礎(chǔ)) 筆記
進(jìn)入 安裝目錄.../bin/mysql.exe cd 更換目錄 dir列出當(dāng)前目錄所有文件 c:\vesa\...\a 尖括號(hào)表示在c盤(pán)/的vasa/的.../的a 文件夾里面 cd空格.. 表示向上一級(jí)目錄 cd空格目錄名 表示進(jìn)入指定目錄 cd空格ted健 表示順序查看目錄名 mysql 空格 -u用戶(hù)名 -p密碼 (即通過(guò)用

來(lái)源:未知//所屬分類(lèi):MySQL教程/更新時(shí)間:2012-07-20
相關(guān)MySQL教程