我们要运行多源复制。
Server version: 5.7.23-23-log Percona Server (GPL), Release '23', Revision '500fcf5'
mysql> CHANGE MASTER TO MASTER_HOST='1.2.3.4', MASTER_PORT=3306, MASTER_USER='repl', MASTER_PASSWORD='xxx' for channel="master1";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '="master1"' at line 1
最新版本的Percona Server是否不支持多源复制,或者SQL命令应该不同?
答案 0 :(得分:1)
看起来正确的罪过是<?php
// set the HTML for the inputs
function show_extra_profile_fields( $user ) {
$is_user_archived = get_user_meta( $user->ID, 'archived_user', true );
?>
<table class="form-table">
<tr>
<th><label for="archived_user"><?php esc_html_e( 'Archive user', 'xlearn' ); ?></label></th>
<td>
<input type="checkbox"
id="archived_user"
name="archived_user"
class="checkbox"
value="yes"
<?php if (get_user_meta( $user->ID, 'archived_user', true ) == "1") echo "checked" ;?>
/>
</td>
</tr>
</table>
<?php
}
add_action( 'edit_user_profile', 'show_extra_profile_fields' );
// update the user meta on save
function update_profile_fields( $user_id ) {
if ( !current_user_can( 'edit_user', $user_id ) ) {
return false;
}
if ( isset( $_POST['archived_user'] ) ) {
update_user_meta( $user_id, 'archived_user', $_POST['archived_user'] );
}
}
add_action( 'edit_user_profile_update', 'update_profile_fields' );