Mysql error Summary (continuously updating)

Source: Internet
Author: User
Tags root access
Mysql error summary. We often see some mysql errors during the development process. Sort out the errors here to make it easier for you.

Mysql error summary. We often see some mysql errors during the development process. Sort out the errors here to make it easier for you.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.