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: 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: 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

1150 - 1199 1250 - 1299