You are here

MySQL Server Error Codes and Messages 1200 - 1249

1150 - 1199 1250 - 1299

  • Error: 1200 SQLSTATE: HY000 (ER_BAD_SLAVE)
    Message: The server is not configured as slave; fix in config file or with CHANGE MASTER TO

    How does the MySQL error message look like?


  • Error: 1201 SQLSTATE: HY000 (ER_MASTER_INFO)
    Message: Could not initialize master info structure; more error messages can be found in the MySQL error log

    How does the MySQL error message look like?


  • Error: 1202 SQLSTATE: HY000 (ER_SLAVE_THREAD)
    Message: Could not create slave thread; check system resources

    How does the MySQL error message look like?


  • Error: 1203 SQLSTATE: 42000 (ER_TOO_MANY_USER_CONNECTIONS)
    Message: User %s already has more than 'max_user_connections' active connections

    How does the MySQL error message look like?


  • Error: 1204 SQLSTATE: HY000 (ER_SET_CONSTANTS_ONLY)
    Message: You may only use constant expressions with SET

    How does the MySQL error message look like?


  • Error: 1205 SQLSTATE: HY000 (ER_LOCK_WAIT_TIMEOUT)
    Message: Lock wait timeout exceeded; try restarting transaction

    How does the MySQL error message look like?


  • Error: 1206 SQLSTATE: HY000 (ER_LOCK_TABLE_FULL)
    Message: The total number of locks exceeds the lock table size

    How does the MySQL error message look like?

    ERROR 1206 (HY000): The total number of locks exceeds the lock table size

    What does the MySQL error message mean?

    Some internal InnoDB structures exceeded their limits.

    When does this MySQL error message happen?

    If you have queries which do a huge number of locking but there is not enough space to store the locking information. This typically happens if InnoDB buffer pool size is too small.

    InnoDB: WARNING: over 67 percent of the buffer pool is occupied by
    InnoDB: lock heaps or the adaptive hash index! Check that your
    InnoDB: transactions do not set too many row locks.
    InnoDB: Your buffer pool size is 7 MB. Maybe you should make
    InnoDB: the buffer pool bigger?

    How to fix this MySQL error?

    Configure innodb_buffer_pool_size appropriately and restart the MySQL server.


  • Error: 1207 SQLSTATE: 25000 (ER_READ_ONLY_TRANSACTION)
    Message: Update locks cannot be acquired during a READ UNCOMMITTED transaction

    How does the MySQL error message look like?

  • Error: 1208 SQLSTATE: HY000 (ER_DROP_DB_WITH_READ_LOCK)

    Message: DROP DATABASE not allowed while thread is holding global read lock

  • Error: 1209 SQLSTATE: HY000 (ER_CREATE_DB_WITH_READ_LOCK)

    Message: CREATE DATABASE not allowed while thread is holding global read lock

  • Error: 1210 SQLSTATE: HY000 (ER_WRONG_ARGUMENTS)

    Message: Incorrect arguments to %s

  • Error: 1211 SQLSTATE: 42000 (ER_NO_PERMISSION_TO_CREATE_USER)

    Message: '%s'@'%s' is not allowed to create new users

  • Error: 1212 SQLSTATE: HY000 (ER_UNION_TABLES_IN_DIFFERENT_DIR)

    Message: Incorrect table definition; all MERGE tables must be in the same database

  • Error: 1213 SQLSTATE: 40001 (ER_LOCK_DEADLOCK)

    Message: Deadlock found when trying to get lock; try restarting transaction

  • Error: 1214 SQLSTATE: HY000 (ER_TABLE_CANT_HANDLE_FT)

    Message: The used table type doesn't support FULLTEXT indexes

  • Error: 1215 SQLSTATE: HY000 (ER_CANNOT_ADD_FOREIGN)

    Message: Cannot add foreign key constraint

  • Error: 1216 SQLSTATE: 23000 (ER_NO_REFERENCED_ROW)

    Message: Cannot add or update a child row: a foreign key constraint fails

  • Error: 1217 SQLSTATE: 23000 (ER_ROW_IS_REFERENCED)

    Message: Cannot delete or update a parent row: a foreign key constraint fails

  • Error: 1218 SQLSTATE: 08S01 (ER_CONNECT_TO_MASTER)

    Message: Error connecting to master: %s

  • Error: 1219 SQLSTATE: HY000 (ER_QUERY_ON_MASTER)

    Message: Error running query on master: %s

  • Error: 1220 SQLSTATE: HY000 (ER_ERROR_WHEN_EXECUTING_COMMAND)

    Message: Error when executing command %s: %s


  • Error: 1221 SQLSTATE: HY000 (ER_WRONG_USAGE)
        Message: Incorrect usage of %s and %s

    How does the MySQL error message look like?

    ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

    What does the MySQL error message mean?

    The GRANT command must be executed globally.

    When does this MySQL error message happen?

    When you run the GRANT command with privileges requiring global conext on a database context.

    SQL> GRANT SUPER ON userdb.* TO root@127.0.0.1;
        ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

    How to fix this MySQL error?

    GRANT SUPER cannot be applied on a specific database. It can only be applied globaly as follows:

    SQL> GRANT SUPER ON *.* TO root@127.0.0.1;
  • Error: 1222 SQLSTATE: 21000 (ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT)

    Message: The used SELECT statements have a different number of columns

  • Error: 1223 SQLSTATE: HY000 (ER_CANT_UPDATE_WITH_READLOCK)

    Message: Can't execute the query because you have a conflicting read lock

  • Error: 1224 SQLSTATE: HY000 (ER_MIXING_NOT_ALLOWED)

    Message: Mixing of transactional and non-transactional tables is disabled

  • Error: 1225 SQLSTATE: HY000 (ER_DUP_ARGUMENT)

    Message: Option '%s' used twice in statement

  • Error: 1226 SQLSTATE: 42000 (ER_USER_LIMIT_REACHED)

    Message: User '%s' has exceeded the '%s' resource (current value: %ld)

  • Error: 1227 SQLSTATE: 42000 (ER_SPECIFIC_ACCESS_DENIED_ERROR)

    Message: Access denied; you need (at least one of) the %s privilege(s) for this operation

  • Error: 1228 SQLSTATE: HY000 (ER_LOCAL_VARIABLE)

    Message: Variable '%s' is a SESSION variable and can't be used with SET GLOBAL

  • Error: 1229 SQLSTATE: HY000 (ER_GLOBAL_VARIABLE)

    Message: Variable '%s' is a GLOBAL variable and should be set with SET GLOBAL

  • Error: 1230 SQLSTATE: 42000 (ER_NO_DEFAULT)

    Message: Variable '%s' doesn't have a default value

  • Error: 1231 SQLSTATE: 42000 (ER_WRONG_VALUE_FOR_VAR)

    Message: Variable '%s' can't be set to the value of '%s'


  • Error: 1232 SQLSTATE: 42000 (ER_WRONG_TYPE_FOR_VAR)
    Message: Incorrect argument type to variable '%s'

    How does the MySQL error message look like?

    mysql> SET GLOBAL innodb_concurrency_tickets = 5k;
    ERROR 1232 (42000): Incorrect argument type to variable 'innodb_concurrency_tickets'

    What does the MySQL error message mean?

    It means that the value specified in the SET command is not recognized. Either it must be a string or numeric. Entering units as in the example is not allowed (yet).

    When does this MySQL error message happen?

    This error happens for example when you specify a value with the SET command in the mysql command line tool.

    How to fix this MySQL error?

    You cannot pass the parameter values like in the my.cnf configuration file. As alternative you can specify the values as follows:

    mysql> SET GLOBAL innodb_concurrency_tickets = 5*1024;

  • Error: 1233 SQLSTATE: HY000 (ER_VAR_CANT_BE_READ)

    Message: Variable '%s' can only be set, not read

  • Error: 1234 SQLSTATE: 42000 (ER_CANT_USE_OPTION_HERE)

    Message: Incorrect usage/placement of '%s'

  • Error: 1235 SQLSTATE: 42000 (ER_NOT_SUPPORTED_YET)

    Message: This version of MySQL doesn't yet support '%s'

  • Error: 1236 SQLSTATE: HY000 (ER_MASTER_FATAL_ERROR_READING_BINLOG)

    Message: Got fatal error %d from master when reading data from binary log: '%s'

  • Error: 1237 SQLSTATE: HY000 (ER_SLAVE_IGNORED_TABLE)

    Message: Slave SQL thread ignored the query because of replicate-*-table rules


  • Error: 1238 SQLSTATE: HY000 (ER_INCORRECT_GLOBAL_LOCAL_VAR)
    Message: Variable '%s' is a %s variable

    How does the MySQL error message look like?

    mysql> SET GLOBAL innodb_version='My InnoDB Version';
    ERROR 1238 (HY000): Variable 'innodb_version' is a read only variable

    What does the MySQL error message mean?

    It means that the variable you want to change cannot be changed because it is a read only variable.

    When does this MySQL error message happen?

    This error happens when you try to change a read only variable or a variable which cannot be changed on-line.

    How to fix this MySQL error?

    Either this variable is not changeable at all or you can only change it in the my.cnf configuration file and restart the database afterwards.


  • Error: 1239 SQLSTATE: 42000 (ER_WRONG_FK_DEF)

    Message: Incorrect foreign key definition for '%s': %s

  • Error: 1240 SQLSTATE: HY000 (ER_KEY_REF_DO_NOT_MATCH_TABLE_REF)

    Message: Key reference and table reference don't match

  • Error: 1241 SQLSTATE: 21000 (ER_OPERAND_COLUMNS)

    Message: Operand should contain %d column(s)

  • Error: 1242 SQLSTATE: 21000 (ER_SUBQUERY_NO_1_ROW)

    Message: Subquery returns more than 1 row

  • Error: 1243 SQLSTATE: HY000 (ER_UNKNOWN_STMT_HANDLER)

    Message: Unknown prepared statement handler (%.*s) given to %s

  • Error: 1244 SQLSTATE: HY000 (ER_CORRUPT_HELP_DB)

    Message: Help database is corrupt or does not exist

  • Error: 1245 SQLSTATE: HY000 (ER_CYCLIC_REFERENCE)

    Message: Cyclic reference on subqueries

  • Error: 1246 SQLSTATE: HY000 (ER_AUTO_CONVERT)

    Message: Converting column '%s' from %s to %s

  • Error: 1247 SQLSTATE: 42S22 (ER_ILLEGAL_REFERENCE)

    Message: Reference '%s' not supported (%s)

  • Error: 1248 SQLSTATE: 42000 (ER_DERIVED_MUST_HAVE_ALIAS)

    Message: Every derived table must have its own alias

  • Error: 1249 SQLSTATE: 01000 (ER_SELECT_REDUCED)

    Message: Select %u was reduced during optimization

1150 - 1199 1250 - 1299