( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10294101944require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10344130936include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10344130936get_header( $name = ???, $args = ??? ).../single.php:10
60.10344131152locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10344131248load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10344131792require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10354139200wp_head( ).../header.php:18
100.10354139200do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10354139416WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10354139416WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10364142832wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10364142832do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10364143048WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10364143048WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10384144936twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.10394146456wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.10394146456WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.10394146456WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.10394146456_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.10394152408wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.10404271944trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10294101944require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10344130936include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10344130936get_header( $name = ???, $args = ??? ).../single.php:10
60.10344131152locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10344131248load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10344131792require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10354139200wp_head( ).../header.php:18
100.10354139200do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10354139416WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10354139416WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10364142832wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10364142832do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10364143048WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10364143048WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10384144936twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.12874273048wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.12874273048WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.12874273048WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.12874273048_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.12874273368wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.12884273592trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

mysqlbinlog 資料庫處理二進制日誌檔案的實用工具

當然,系統剛弄好是沒有開啟 mysqlbinlog 的功能,至少在 CentOS4.4 上面我還要去開啟,不過 ubuntu 系統預設就已經開啟了,不過沒關係,只要利用下面方法就可以達到了


修改 my.cnf [ CentOS: /etc/my.cnf Ubuntu: /etc/mysql/my.cnf ],加入下面語法



# Replication Master Server (default)
# binary logging is required for replication
log-BIN=mysql-BIN


不過話說當你開啟這個功能之後,你會發現在 /var/lib/mysql/ 底下多出很多檔案



-rw-rw—-   1 mysql mysql  33164904  117 15:44 mysql-bin.000001
-rw-rw—-   1 mysql mysql      4007  117 15:50 mysql-bin.000002
-rw-rw—-   1 mysql mysql  70288989  129 22:38 mysql-bin.000003
-rw-rw—-   1 mysql mysql     16665  129 22:41 mysql-bin.000004
-rw-rw—-   1 mysql mysql      4792  129 22:42 mysql-bin.000005
-rw-rw—-   1 mysql mysql  56274069  210 06:25 mysql-bin.000006
-rw-rw—-   1 mysql mysql 893963240  329 09:21 mysql-bin.000007
-rw-rw—-   1 mysql mysql 666605284  329 09:39 mysql-bin.000008
-rw-rw—-   1 mysql mysql    151946  329 10:02 mysql-bin.000009
-rw-rw—-   1 mysql mysql   3450785  329 22:38 mysql-bin.000010

上面就是產生 mysqlbinlog 檔案,當然如果你要觀看那一個檔案下指令吧



shell> mysqlbinlog binlog.0000003


裏面的語法包跨 每個語句花費的時間、客戶發出的線程ID、發出線程時的時間戳,也可以遠端觀看


當讀取遠程二進制日誌時,可以通過連接參數選項來指示如何連接伺服器,但它們經常被忽略掉,除非您還指定了–read-from-remote-server選項。這些選項是–host、–password、–port、–protocol、–socket和–user。


底下來說明一下用法~


1. 指定恢復時間語法


假如你今天早上9點不小心砍掉哪個資料庫的資料表,你可以利用下面語法來恢復



mysqlbinlog –stop-date=“2007-03-29 8:59:59”  /var/lib/mysql/bin.000001 | mysql -u root -p

如果你想恢復後面9點以後sql語法 可以使用



mysqlbinlog –start-date=“2007-03-29 9:00:00”  /var/lib/mysql/bin.000001 | mysql -u root -p

或者是 你想恢復 9點到10點之間的sql語法,則下面語法是您想要的



mysqlbinlog –start-date=“2007-03-29 9:00:00”  –stop-date=“2007-03-29 10:00:00” /var/lib/mysql/bin.000001 | mysql -u root -p

其實你也可以不要執行,先把sql語法輸出到 /tmp/restore.sql



mysqlbinlog –start-date=“2007-03-29 9:00:00”  –stop-date=“2007-03-29 10:00:00” /var/lib/mysql/bin.000001 &gt; /tmp/restore.sql

當然 你也可以指定你要輸出的 database,免的檔案很大



database=db_name,-d db_name
host=host_name,-h host_name

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.