Troubleshooting MYSQL or MariaDB Errors from Error 1221 to 1230

SQLServerF1

MariaDB ERROR Code 1221
MySQL SQL State HY000
ER_WRONG_USAGE
Incorrect usage of %s and %s
MariaDB ERROR Code 1222
MySQL SQL State 21000
ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
The used SELECT statements have a different number of columns
MariaDB ERROR Code 1223
MySQL SQL State HY000
ER_CANT_UPDATE_WITH_READLOCK
Can’t execute the query because you have a conflicting read lock

MariaDB ERROR Code 1224
MySQL SQL State HY000
ER_MIXING_NOT_ALLOWED
Mixing of transactional and non-transactional tables is disabled
MariaDB ERROR Code 1225
MySQL SQL State HY000
ER_DUP_ARGUMENT
Option ‘%s’ used twice in statement
MariaDB ERROR Code 1226
MySQL SQL State 42000
ER_USER_LIMIT_REACHED
User ‘%s’ has exceeded the ‘%s’ resource (current value: %ld)

MariaDB ERROR Code 1227
MySQL SQL State 42000
ER_SPECIFIC_ACCESS_DENIED_ERROR
Access denied; you need (at least one of) the %s privilege(s) for this operation
MariaDB ERROR Code 1228
MySQL SQL State HY000
ER_LOCAL_VARIABLE
Variable ‘%s’ is a SESSION variable and can’t be used with SET GLOBAL
MariaDB ERROR Code 1229
MySQL SQL State HY000
ER_GLOBAL_VARIABLE
Variable ‘%s’ is a GLOBAL variable and should be set with SET GLOBAL
MariaDB ERROR Code 1230
MySQL SQL State 42000
ER_NO_DEFAULT
Variable ‘%s’ doesn’t have a default value

Above are the list of shared MySQL and MariaDB Error Codes and their Description including SQL state and exact error code from Error 1221 to 1230 which performing certain operations against MySQL or MariaDB.

What are MYSQL/MariaDB Errors?

MySQL and MariaDB programs have access to several types of common error information when the server returns an error.

The MYSQL/MariaDB message displayed contains three types of information:
A numeric error code. This number is MySQL-specific and is not portable to other database systems.
A five-character SQLSTATE value. The values are specified by ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers are mapped to SQLSTATE error codes.
A message string that provides a textual description of the error.
When an error occurs, you can access the MySQL error code, the SQLSTATE value, and the message string using C API functions:
MySQL error code: Call mysql_errno()
SQLSTATE value: Call mysql_sqlstate()
Error message: Call mysql_error()

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about MYSQL and MariaDB Error Codes and Error Messages or Warnings on Windows, Linux Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *