MySQL遠端連線不上的解決之前遇到過MySQL本地可以串連但是遠程連不上的問題,沒有記錄,今天在雲上新申請的伺服器上又遇到這個問題,記錄一下解決過程。1. 排除網路或防火牆問題先看是否能ping通遠程伺服器,ping 192.168.1.211,如果不可以就是網路問題。然後,檢查連接埠是否被防火牆擋住了,telnet 192.168.1.211 3306,如果串連失敗,配置防火牆。配置防火牆,開啟3306連接埠 vi /etc/sysconfig/iptables -A INPUT -m
冷備下類比rm -rf *.dbf恢複案例關於備份恢複一直是所有關係型資料庫的重頭戲。下面會介紹冷備資料庫,並類比破壞資料檔案進行恢複資料庫,並涉及到其他相關內容。[Oracle@localhost ~]$ cat /etc/RedHat-releaseRed Hat Enterprise Linux Server release 5.5 (Tikanga)SQL> select * from v$version where rownum<2;BANNER--------------
Oracle使用order by排序關於null值處理,oracleorder在Oracle中使用order by進行查詢排序時,如果排序欄位中有空值(null),排序結果可能會達不到我們想要的結果。如:select * from test order by age desc; 按照age欄位降序排序,結果如下:將sql語句改為select * from test order by age desc nulls last;即可將null值排到最後。”nulls last”將空值放在後面,相反的”
Consecutive Numbers,consecutivenumbers Write a SQL query to find all numbers that appear at least three times consecutively. +----+-----+ | Id | Num | +----+-----+ | 1 | 1 | | 2 | 1 | | 3 | 1 | | 4 | 2 |
About Oracle Cluster Registry,oracleclusterAbout Oracle Cluster RegistryOracle Cluster Registry (OCR) is a file that contains information about the cluster node list and instance-to-node mapping information. OCR also contains information about
一個複雜子查詢SQL最佳化,複雜子SQL最佳化select * from test.vmark vk where id in (select v.id from usr_center.vmark_degree_update_log v, (select min(id) id from usr_center.vmark_degree_update_log where