为何小弟我的一条insert语句插入两条数据

为何我的一条insert语句插入两条数据?

mysql> delete from data;

Query OK, 8 rows affected (0.00 sec)

mysql> select * from data;

Empty set (0.00 sec)

mysql> insert into data(name,address,phone) values (‘pangang1′,’daban1′,’09023539335’);

Query OK, 1 row affected (0.00 sec)

mysql> select * from data;

+———-+———+————-+

| name | address | phone |

+———-+———+————-+

| pangang1 | daban1 | 09023539335 |

| pangang1 | daban1 | 09023539335 |

+———-+———+————-+

2 rows in set (0.00 sec)

mysql>

可能是哪里配置错了?

[root@node1 etc]# cat my.cnf

# Example MySQL config file for medium systems.

#

# This is for a system with little memory (32M – 64M) where MySQL plays

# an important part, or systems up to 128M where MySQL is used together with

# other programs (such as a web server)

#

# You can copy this file to

# /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options (in this

# installation this directory is /usr/local/mysql/var) or

# ~/.my.cnf to set user-specific options.

#

# In this file, you can use all long options that a program supports.

# If you want to know which options a program supports, run the program

# with the “–help” option.

# The following options will be passed to all MySQL clients

[client]

#password = your_password

port = 3306

socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server

[mysqld]

port = 3306

socket = /tmp/mysql.sock

skip-locking

key_buffer = 16M

max_allowed_packet = 1M

table_cache = 64

sort_buffer_size = 512K

net_buffer_length = 8K

read_buffer_size = 256K

read_rnd_buffer_size = 512K

myisam_sort_buffer_size = 8M

# Don’t listen on a TCP/IP port at all. This can be a security enhancement,

# if all processes that need to connect to mysqld run on the same host.

# All interaction with mysqld must be made via Unix sockets or named pipes.

# Note that using this option without enabling named pipes on Windows

# (via the “enable-named-pipe” option) will render mysqld useless!

#

#skip-networking

# Disable Federated by default

#skip-federated

# Replication Master Server (default)

# binary logging is required for replication

log-bin=mysql-bin

#######################################################

log-bin=/var/log/mysql/updatelog

binlog-do-db=test

replicate-same-server-id

master-host=192.168.1.128

master-user=backup

master-password=pangang

master-connect-retry=60

replicate-do-db=test

binlog-ignore-db=mysql

#######################################################

# binary logging format – mixed recommended

binlog_format=mixed

# required unique id between 1 and 2^32 – 1

# defaults to 1 if master-host is not set

# but will not function as a master if omitted

server-id = 1

# Replication Slave (comment out master section to use this)

#

# To configure this host as a replication slave, you can choose between

# two methods :

#

# 1) Use the CHANGE MASTER TO command (fully described in our manual) –

# the syntax is:

#

# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,

# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;

#

# where you replace <host>, <user>, <password> by quoted strings and

# <port> by the master’s port number (3306 by default).

#

# Example:

#

# CHANGE MASTER TO MASTER_HOST=’125.564.12.1′, MASTER_POR

为何小弟我的一条insert语句插入两条数据

相关文章:

你感兴趣的文章:

标签云: