Aaronlong31

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            12 Posts :: 3 Stories :: 17 Comments :: 0 Trackbacks

          2010年8月6日 #

          常見錯誤號對照表

          MySQL error code SQLSTATE code Error message

          1011 HY000 Error on delete of '%s' (errn %d)
          1021 HY000 Disk full (%s); waiting for someone to free some space . . .
          1022 23000 Can't write; duplicate key in table '%s'
          1027 HY000 '%s' is locked against change
          1036 HY000 Table '%s' is read only
          1048 23000 Column '%s' cannot be null
          1062 23000 Duplicate entry '%s' for key %d
          1099 HY000 Table '%s' was locked with a READ lock and can't be updated
          1100 HY000 Table '%s' was not locked with LOCK TABLES
          1104 42000 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
          1106 42000 Incorrect parameters to procedure '%s'
          1114 HY000 The table '%s' is full
          1150 HY000 Delayed insert thread couldn't get requested lock for table %s
          1165 HY000 INSERT DELAYED can't be used with table '%s' because it is locked with LOCK TABLES
          1242 21000 Subquery returns more than 1 row
          1263 22004 Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld
          1264 22003 Out of range value adjusted for column '%s' at row %ld
          1265 1000 Data truncated for column '%s' at row %ld
          1312 0A000 SELECT in a stored program must have INTO
          1317 70100 Query execution was interrupted
          1319 42000 Undefined CONDITION: %s
          1325 24000 Cursor is already open
          1326 24000 Cursor is not open
          1328 HY000 Incorrect number of FETCH variables
          1329 2000 No data to FETCH
          1336 42000 USE is not allowed in a stored program
          1337 42000 Variable or condition declaration after cursor or handler declaration
          1338 42000 Cursor declaration after handler declaration
          1339 20000 Case not found for CASE statement
          1348 HY000 Column '%s' is not updatable
          1357 HY000 Can't drop a %s from within another stored routine
          1358 HY000 GOTO is not allowed in a stored program handler
          1362 HY000 Updating of %s row is not allowed in %s trigger
          1363 HY000 There is no %s row in %s trigger
          posted @ 2010-08-11 11:13 Aaronlong31 閱讀(853) | 評論 (0)編輯 收藏

          之前一個監視應用的好工具JavaMelody,功能十分齊全,這次介紹個 
          稍微小點的,專門為TOMCAT 而設計的。下面講解其用法: 

          1 下載: 
          http://www.lambdaprobe.org/downloads/1.7/probe.1.7b.zip 
          2 解壓縮后,把probe.war放到TOMCAT的webapps下,設置server.xml 
          的context 
          3 設置用戶如下,在tomcat_user.xml中 
             vi /usr/local/tomcat/conf//tomcat-users.xml 

          <?xml version='1.0' encoding='utf-8'?> 
          <tomcat-users> 
                  <role rolename="manager"/> 
                  <role rolename="standard"/> 
                  <role rolename="tomcat"/> 
                  <role rolename="admin"/> 
                  <role rolename="role1"/> 
                  <user username="tomcat" password="tomcat" roles="tomcat"/> 
                  <user username="both" password="tomcat" roles="tomcat,role1"/> 
                  <user username="probe" password="probe" roles="admin,manager"/> 
                  <user username="role1" password="tomcat" roles="role1"/> 
          </tomcat-users> 

          4 設置環境變量,獲取服務器狀態 
          # vi /etc/profile 
          JAVA_OPTS=-Dcom.sun.management.jmxremote 
          export JAVA_OPTS 

          5 重啟動服務器 
          6 輸入http://localhost/probe/,輸入用戶名和密碼 
          7 即可進入,這里比較精彩的是對內存的監視,動態顯示了JVM的內存圖表
          posted @ 2010-08-09 12:51 Aaronlong31 閱讀(398) | 評論 (0)編輯 收藏

          設置每天8:50開機,要是9:15電腦還沒人使用.就自動關機.
          計算機啟動時按“Delete”鍵進入BIOS界面。
          在BIOS設置主界面中選擇“Power Management Setup”菜單,
          Resume By Alarm 值設成Enabled
          再在”Date (of Month) Alarm”和“Time (hh:mm:ss) Alarm”中設定開機的日期和時間。
          如果把“Date”設為0,則默認為每天定時開機。
          設置好后按“F10“保存設置就可以了,機器會重新啟動,設置成功。
          自動登錄
          單擊“開始/運行”,輸入“rundll32 netplwiz.dll,UsersRunDll”
          按回車鍵后彈出“用戶帳戶”窗口
          然后取消選定“要使用本機,用戶必須輸入用戶名和密碼”選項,單擊確定
          在彈出的對話框中輸入你想讓電腦每次自動登錄的賬戶和密碼即可。
          自動關機
          1.控制面板>管理工具>服務
          雙擊名稱列為 Task Scheduler 的記錄,把啟動類型設為自動,再點啟動按鈕,再保存.
          再從運行中輸入
          at 9:15 /every:M,T,W,Th,F,S,Su shutdown -s -f -t 300 -c "快要停電了,取消關機命令shutdown -a"
          第天9:15 執行關機,有300秒的等待時間。
          posted @ 2010-08-09 12:45 Aaronlong31 閱讀(416) | 評論 (0)編輯 收藏

          1.修改linux的時間可以使用date指令

          在命令行輸入:

          date
           顯示當前時間 Fri Aug  3 14:15:16 CST 2007

          date -s 
          按字符串方式修改時間
          可以只修改日期,不修改時間,輸入: date -s 2007-08-03
          只修改時間,輸入:date -s 14:15:00
          同時修改日期時間,注意要加雙引號,日期與時間之間有一空格,輸入:date -s "2007-08-03 14:15:00"

          修改完后,記得輸入:clock -w 
          把系統時間寫入CMOS

          2.Linux下啟動/關閉/重啟Mysql
          /etc/init.d/mysql   start|stop|restart|reload|force-reload
          posted @ 2010-08-06 10:02 Aaronlong31 閱讀(246) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 甘南县| 大英县| 旬邑县| 岳普湖县| 宁晋县| 民权县| 常德市| 湘潭县| 莱芜市| 泾阳县| 黄平县| 博乐市| 康平县| 晋宁县| 龙里县| 石门县| 南部县| 台江县| 丹凤县| 马边| 沾益县| 香格里拉县| 奉节县| 枣阳市| 玛多县| 潮州市| 舒兰市| 藁城市| 文山县| 临颍县| 丰镇市| 梁平县| 五台县| 广宁县| 枣强县| 宜春市| 鱼台县| 孟村| 准格尔旗| 屏山县| 剑河县|