1. Mysql errono 1005: The primary and Foreign keys are not completely consistentCheck the following points:
A. Does the field exist?
B. Whether the types are consistent (pay attention to the unsigned and powerdesign generation issues)
C. Database Engine consistency
D. Whether the character encoding is consistent
E. On windows, modify lower_case_table_names = 0. windows is case-insensitive. If it is changed to 0, the referenced table may not be found.
2. Mysql errono 121: duplicate foreign key constraint names
3. Record the abbreviations in Mysql WorkBench:
PK: primary key (column is part of a pk)
NN: not null (column is nullable)
UQ: unique (column is part of a unique key)
AI: auto increment (the column is auto incremented when rows are inserted)
BIN: binary (if dt is a blob or similar, this indicates that is binary data, rather than text)
UN: unsigned (for integer types, see docs: "10.2. Numeric Types ")
ZF: zero fill (rather a display related flag, see docs: "10.2. Numeric Types ")
4. mysql permission settings
// Add the MYSQL root access permission for the remote host
Insert into user (host, user, password) values ('%', 'root', PASSWORD ('root '));
// Root permission authorization
Grant all privileges on *. * to 'root' @ '%' identified by 'root' with grant option;
// Update permission settings
Flush privileges;
5. Firewall settings
// Open the port
/Sbin/iptables-I INPUT-p tcp -- dport 3306-j ACCEPT
// Save
/Etc/rc. d/init. d/iptables save
// View the status
/Etc/init. d/iptables status
6. Automatic startup (similar to Windows Services)
/Sbin/chkconfig -- level 2345 mysqld on
/Sbin/chkconfig -- list
The result is as follows:
Mysqld 0: off 1: off 2: on 3: on 4: on 5: on 6: off