Problems for beginners of MySQL _ MySQL

Source: Internet
Author: User
Problems that MySQL beginners may encounter

Note:

Insert into table name values (value); if columns are omitted, you must enter a data that meets the growth column type. Otherwise, an error is returned.

Inert into table name (column name) values (value); this write method can not write growth columns;

MySQL error: there can be only one auto column and it must be defined as a key

This error is returned when you create a table today. there can be only one auto column and it must be defined as a key, later, Google found the answer from a uk website because you set auto_increment for A field (which is represented by field A below) and another field (which is represented by field B below) this is incorrect because MySQL regards automatically increasing fields as gradual. Therefore, according to this logic, your table has two primary keys, so the method is to gradually remove the index of field B. If you want to keep the data of field B from being repeated, you can use Unique to limit it.

MySQL remote connection:

If you use grant all on *. * to root @ % identified by password, you can use sudo vi/etc/mysql/my. cnf open the file with vi, find bind-address = 127.0.0.1, Press insert key, comment out this line with #, press Esc, and press enter wq, OK !, Restart mysql to connect remotely.

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.