Solutions to common database errors! Yes! (Including Common Agent installation errors)

Source: Internet
Author: User
Tags import database
Here is a solution for MySQL query error prompts. Some of them can be solved by yourself. It is not necessary to ask questions over and over again. Unless it is a conventional method that cannot be solved ~

The following is a common database error message prompt when installing plug-ins: [copy to clipboard]

Code:

Duplicate column name 'allowrank'
Occasionally, this indicates that the table already exists. However, if the installation is performed, the following steps are not affected. If this problem occurs during the compilation of the plug-in, change the table name. [Copy to clipboard]

Code:

Error: duplicate entry 'aa2hv2' for key 1
Errno.: 1062
Generally, the key value is repeatedly input, resulting in repeated errors. You can create a new table to solve this problem. [Copy to clipboard]

Code:

Error: Unknown system variable 'names'
Errno.: 1193
It is easy to import data. Open an SQL File
1. Delete set names 'gbk'
2. Find engine = MyISAM default charset = GBK and replace it with: TYPE = MyISAM.
3. Find engine = heap default charset = GBK and replace it with type = heap.
4. delete character set GBK collate gbk_bin.
5. Restore the instance. [Copy to clipboard]

Code:

Error: 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 'default charset = gbk' at line 1
Errno.: 1064
Generally, the encoding does not match. Open the installation file and see the Database Upgrade Code. You can delete the file with 'default charset = gbk. [Copy to clipboard]

Code:

Error: 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's XXXXX
Errno.: 1064
This is a tough issue. Generally, database code is written in different types. For example, if you write Chinese characters at a floating point, you can check your settings to check whether the numbers are written in English or Chinese. If any problem occurs during the compilation of the plug-in, check the correctness of the database syntax.
For data import, you can use restore. php to import data. [Copy to clipboard]

Code:

Error: Unknown column 'ff. threadperms 'in 'field list'
This is the best solution. Generally, the prompt "unknown column" is displayed, indicating that your data table is missing this table. You can create it manually. [Copy to clipboard]

Code:

Error: Access denied for user: 'unknown _ user @ localhost' (using password: Yes)
I don't know what to say about this problem ~ It is still unclear if the Database Password user has entered an error. Contact the Space Provider. [Copy to clipboard]

Code:

Can't drop 'aaaallowrank '; Check that column/key exists
This is usually caused by reverse installation, indicating that the table does not exist. In fact, there is no problem. If it does not exist, there is no need to install it. [Copy to clipboard]

Code:

Error: Illegal mix of collations (latin1_swedish_ci, implicit) and (gbk_chinese_ci, coercible) for Operation '='
Errno.: 1267
If the character set of the database is invalid, modify the character set of the data table in phpMyAdmin. [Copy to clipboard]

Code:

Discuz! Info: MySQL query Error
User: Admin
Time: PM
Script:/bbs2/index. php
SQL: delete from cdb_subscriptions where lastpost <'201312'-1145421168
Error: Unknown column 'lastpost' in 'where clause'
Errno: 1054
An Error Report has been dispatched to our administrator.

Cause: the lastpost field is missing in the subscriptions table.
Solution: in phpMyAdmin or DZ Forum background, "upgrade Database", enter the following statement:

Alter table cdb_subscriptions add lastpost int (10) unsigned not null default '0' after tid;

[Copy to clipboard]

Code:

Connection error 1251:
#1251-client does not support Authentication Protocol requested by server; consider upgrading MYSQL client
Solution:
Mysql> Update mysql. User SET Password = old_password ('Password') where host = 'localhost (host name) or ip' and user = 'database username ';
Mysql> flush privileges; mysql> use MySQL
Mysql> Update user SET Password = old_password ('cnscn ');
Error 2006 (hy000): MySQL server has gone away
No connection. Trying to reconnect...
Connection ID: 1
Current Database: MySQL

Query OK, 5 rows affected (0.01 Sec)
Rows matched: 5 changed: 5 Warnings: 0

Mysql> flush privileges;
Query OK, 0 rows affected (0.00 Sec)

[Copy to clipboard]

Code:

Discuz! Info: MySQL query Error

User: imoker
Time: PM
Script:/BBS/viewthread. php

SQL: Select expiration, keywords, relatedthreads from cdb_relatedthreads where tid = '123'
Error: Can't find file: 'cdb _ relatedthreads. myi' (errno: 2)
Errno.: 1017
Similar Error Report has beed dispatched to administrator before.

Error analysis: the server is shut down illegally, which may affect some databases.

An error is reported during normal operation.
**. MYD cannot be enabled.
Can't find file: '***. myi'

Solution: Use the repair. php file in the utilities directory in the compressed Forum package you downloaded to fix it.
Method: Upload repair. php to the root directory of the forum and run it in the browser.

Http: // your forum address/repair. php

Generally, click the first link "repair. php? Html = 1 & check = 1 "to fix it,
If it cannot be repaired, click the second connection "repair. php? Check = 1 & iterations = 5"

You can.

Tip: After you fix the table, remember to delete the repair. php file from the server.

My own sorting, updated on April 9, October 17. If you have any additional information, Let's explain it.
1005: Table creation failed 1006: database creation failed 1007: database already exists, database creation failed 1008: Database not found, database deletion failed 1009: database files cannot be deleted, resulting in database deletion failure 1010: failed to delete the database because the data directory cannot be deleted. 1011: failed to delete the database file. 1012: unable to read the records in the system table. 1020: the records have been modified by other users. 1021: insufficient space on the hard disk, please increase hard disk space 1022: duplicate keywords, change record failed 1023: Close error 1024: Read File error 1025: Change name error 1026: Write File error 1032: record does not exist 1036: the data table is read-only and cannot be modified. 1037: The system memory is insufficient. Restart the database or restart the server. 1038: the memory used for sorting is insufficient. Increase the sorting buffer by 1040: the maximum number of connections to the database has been reached. please increase the number of available connections to the database by 1041: The system memory is less than 1042: the host name is invalid 1043: the connection is invalid 1044: the current user has no permission to access the database 1045: cannot connect to the database. username or password error 1048: field cannot be blank 1049: database does not exist 1050: data table already exists 1051: data table does not exist 1054: field does not exist 1065: Invalid SQL statement, SQL statement is empty 1081: cannot establish socket connection 1114: The data table is full, cannot accommodate any records 1116: too many open data tables 1129: Database exception, Please restart the database 1130: database connection failed, no database connection permission 1133: database user does not exist 1141: current user does not have access to database 1142: current user does not have access to data table 1143: current user does not have access to fields in data table 1146: data table does not exist 1147: undefined user access permission to data table 1149: SQL statement syntax error 1158: network error, read error, Check network connection status 1159: network error, read timeout, check network connection status 1160: network error and write error. Check network connection Status 1161: network error and write timeout. Check network connection status 1062: Repeated field values, failed to import database 1169: Repeated field values, failed to update record 1177: failed to open data table 1180: failed to submit transaction 1181: failed to roll back transaction 1203: the maximum number of connections established between the current user and the database has reached the database. Increase the number of available database connections or restart the database 1205: lock timeout 1211: the current user does not have the permission to create a user 1216: failed to check foreign key constraints, failed to update sub-table records 1217: failed to check foreign key constraints, failed to delete or modify master table records 1226: the resources used by the current user have exceeded the allowed resources, please restart the database or restart the server 1227: You are not authorized to perform this operation 1235: mysql version is too low, does not have this function

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.