Title,What's the problem today?, In theory, there's no problem with the code.,But I still reported the mistake.,PutSQLPrint it out and put it inDBIt can be executed normally..It's depressing.,In Baidu inside Du For a long time without a relevant explanation,I found a few people who didn't respond. "Website appearsQuery was emptyError" Post,And then I checked.MYSQLCommon error code parsing DaquanMysql_errno ()Just knew it was1065: invalidSQLStatementSQLStatement is empty Errors caused by. So we should put the emphasis onSQLStatement on,And finally found out it was mine.SQLThe variables in the statement are capitalized,This variable is used in lowercase for the sake of execution.,^_^,False alarm a trip,
1005: Failed to create table
1006: Failed to create database
1007: Database already exists, failed to create database
1008: Database does not exist, database deletion failed
1009: Unable to delete database file causes database failure to be deleted
1010: Unable to delete data directory causes database failure to be deleted
1011: Failed to delete database file
1012: Cannot read records in system tables
1016:Unable to open file
After hitting Begin=All Programs=Attachment=Command prompt
InputMySQLDisk drive letter
CD MySQLLocation Directory
CD Bin
Inputmyisamchk-f D:\usr\local\mysql\data\bbs\PW_membars. MYI
Ps:d:\usr\local\mysql\data\bbsis the path to your forum database
- FDepending on the circumstances of the choice, generally also can choose- R
Pay attention to your SystemCDisk or put the database is sufficient, generally less than1Gis prone to errors.
1020: The record has been modified by another user
1021: Insufficient hard disk space, please increase hard disk free space
1022: Duplicate keyword, change record failed
1023: An error occurred while shutting down
1024x768: Read File Error
1025: An error occurred while changing the name
1026: Write File Error
1032: Record does not exist
1036: The data table is read-only and cannot be modified
1037: Insufficient system memory, please restart the database or restart the server
1038: Insufficient memory for sorting, increase sort buffer
1040: The maximum number of connections to the database has been reached, please increase the number of available connections to the database
1041: Insufficient system memory
1042: Invalid host Name
1043: Invalid connection
1044: The current user does not have permission to access the database
1045: Unable to connect to database, user name or password error
Method1:Ensure that the forumDataUnder the directorysql_config.phpUser name and password are correct.If the user forgets the password for the database,Can be done as follows
Change of password:
IfMySQLIs running, stop first.
StartMySQL:bin/safe_mysqld--skip-grant-tables &
You can enter without the need for a password.MySQLThe
Then there is
>use MySQL
>update User Set Password=password ("New_pass") where user= "root";
>flush privileges;
Method2: This error occurs when the database user name and password are correct, and check that the forum has no write permission.
1040:Maximum number of connections
Method:InMy.iniModifymax_connections=100Formax_connections=1000or greater,RestartMySQL
1048: field cannot be empty
1049: Database does not exist
1050: Data table already exists
1051: Data table does not exist
1054: field does not exist
1065: invalidSQLStatementSQLStatement is empty
1081: Cannot EstablishSocketConnection
1114: The data sheet is full and cannot hold any records
1116: Too many Open data tables
1129: The database has an exception, please restart the database
1130: Failed to connect to database without permission to connect to database
1133: Database user does not exist
1141: The current user does not have permission to access the database
1142: The current user does not have permission to access the data table
1143: The current user does not have access to the fields in the datasheet
1146: Data table does not exist
1147: User access to the data table is undefined
1149:SQLStatement syntax error
1158: Network error, read error, please check network connection status
1159: Network error, read timeout, check network connection status
1160: Network error, write error, please check network connection status
1161: Network error, write timeout, check network connection status
1062: Duplicate field value, failed to inbound
Method:
1.If a similar main code is"65535"The error,You can view the self-increment fields of related tables,Change the value of the field to
2.Ensure that the fields in the related data table are duplicated by the main code,Delete this record if it exists
3.Backing Up the database,Repairing related Tables(Note:This situation is more common,Such aspw_postsTable,Do not forget to fix the table Remember backup).
1169: Duplicate field value, update record failed
1177: Failed to open data table
1180: Commit TRANSACTION failed
1181: ROLLBACK TRANSACTION failed
1203: The connection established by the current user and database has reached the maximum number of connections to the database, increase the number of available database connections or restart the database
1205: Lock timeout
1211: The current user does not have permission to create a user
1216: FOREIGN KEY constraint check failed, update child table record failed
1217: FOREIGN KEY constraint check failed, delete or modify master table record failed
1226: The current user is using more resources than allowed, please restart the database or restart the server
1227: Insufficient permissions, you do not have permission to do this
1235:MySQLVersion is too low to have this feature
10061:Method: Start the machine on this one.MySQLService
If the service fails to start
It must be yours.My.iniThe file went wrong,
MySQLService does not start properly
After you have deleted it,MySQLwill run according to its default configuration,
Then there's no problem.
10048:
Suggested inMy.iniThe maximum number of connections in the file is modified,
Putmysql_connect ()Methods have been changed intomysql_pconnect ()Method.
To modifymysql_pconnect (), can be in the forum'sDataof the Catalogsql_config.phpIn
$pconnect = 0;//Whether the connection is persistent
Modified into$pconnect = 1;
Turn on anti-refresh,It is forbidden to refresh too fast.
10055:No cache space to take advantage of
Method:Look under yourc disk space is full clear some unused files &NBSP; can be core feature settings < Span style= "font-family: ' Times New Roman ';" > " Open " close
MySQL common error Mysql_errno () code parsing