spechal.com | [spesh-uhl]

CAT | MySQL

460 views
Nov/09

27

Python MySQL Associative Array

By default, the MySQLdb module to access a MySQL database returns the data as an integer indexed array. Sometimes this is not desirable and an associative array is preferred, such as the mysql_fetch_assoc function in PHP. In addition, we will be using the pprint module which is similar PHP’s print_r

Here is the Python equivalent:

import MySQLdb
import pprint
# connect to the database here
db = MySQLdb.connect(...)
c = db.cursor(cursorclass=MySQLdb.cursors.DictCursor)
query = "SELECT `name`, `address` FROM `table`"
c.execute(query)
rows = c.fetchall()
c.close()
pprint.pprint(rows) # i.e. print_r($rows)

Hope that helps someone.

, ,

378 views
Nov/09

20

Reset lost MySQL root password

So you’ve forgotten your MySQL root password have you? As long as you have command line access to the MySQL server, never fear! Execute the following bit of code from your MySQL bin directory, replacing YOURPASSWORD with your new password.

mysqladmin -u root password YOURPASSWORD

Easy as pie!

218 views
/**
   *  Function to validate a generated GUID / UUID
   *  @param string $guid GUID
   *  @return bool
   */
  function validGUID($guid){
    return preg_match('#^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$#', $guid);
  }

,

766 views
Nov/09

15

PHP function to emulate MySQL UUID

/**
   *  uuid
   *
   *  uuid() simply replicates MySQL's UUID function, which returns a 36
   *  character "random" hash (32 alphanumeric, 4 dashes).
   *  @return string
   */
  function uuid(){
    return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
      mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff),
      mt_rand(0, 0x0fff) | 0x4000,
      mt_rand(0, 0x3fff) | 0x8000,
      mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff));
  }

,

1,306 views
Nov/09

15

MySQL Error Code Reference

MySQL OS Error Code 1: Operation not permitted
MySQL OS Error Code 2: No such file or directory
MySQL OS Error Code 3: No such process
MySQL OS Error Code 4: Interrupted system call
MySQL OS Error Code 5: Input/output error
MySQL OS Error Code 6: No such device or address
MySQL OS Error Code 7: Argument list too long
MySQL OS Error Code 8: Exec format error
MySQL OS Error Code 9: Bad file descriptor
MySQL OS Error Code 10: No child processes
MySQL OS Error Code 11: Resource temporarily unavailable
MySQL OS Error Code 12: Cannot allocate memory
MySQL OS Error Code 13: Permission denied
MySQL OS Error Code 14: Bad address
MySQL OS Error Code 15: Block device required
MySQL OS Error Code 16: Device or resource busy
MySQL OS Error Code 17: File exists
MySQL OS Error Code 18: Invalid cross-device link
MySQL OS Error Code 19: No such device
MySQL OS Error Code 20: Not a directory
MySQL OS Error Code 21: Is a directory
MySQL OS Error Code 22: Invalid argument
MySQL OS Error Code 23: Too many open files in system
MySQL OS Error Code 24: Too many open files
MySQL OS Error Code 25: Inappropriate ioctl for device
MySQL OS Error Code 26: Text file busy
MySQL OS Error Code 27: File too large
MySQL OS Error Code 28: No space left on device
MySQL OS Error Code 30: Read-only file system
MySQL OS Error Code 31: Too many links
MySQL OS Error Code 32: Broken pipe
MySQL OS Error Code 33: Numerical argument out of domain
MySQL OS Error Code 34: Numerical result out of range
MySQL OS Error Code 35: Resource deadlock avoided
MySQL OS Error Code 36: File name too long
MySQL OS Error Code 37: No locks available
MySQL OS Error Code 38: Function not implemented
MySQL OS Error Code 39: Directory not empty
MySQL OS Error Code 40: Too many levels of symbolic links
MySQL OS Error Code 42: No message of desired type
MySQL OS Error Code 43: Identifier removed
MySQL OS Error Code 44: Channel number out of range
MySQL OS Error Code 45: Level 2 not synchronized
MySQL OS Error Code 46: Level 3 halted
MySQL OS Error Code 47: Level 3 reset
MySQL OS Error Code 48: Link number out of range
MySQL OS Error Code 49: Protocol driver not attached
MySQL OS Error Code 50: No CSI structure available
MySQL OS Error Code 51: Level 2 halted
MySQL OS Error Code 52: Invalid exchange
MySQL OS Error Code 53: Invalid request descriptor
MySQL OS Error Code 54: Exchange full
MySQL OS Error Code 55: No anode
MySQL OS Error Code 56: Invalid request code
MySQL OS Error Code 57: Invalid slot
MySQL OS Error Code 59: Bad font file format
MySQL OS Error Code 60: Device not a stream
MySQL OS Error Code 61: No data available
MySQL OS Error Code 62: Timer expired
MySQL OS Error Code 63: Out of streams resources
MySQL OS Error Code 64: Machine is not on the network
MySQL OS Error Code 65: Package not installed
MySQL OS Error Code 66: Object is remote
MySQL OS Error Code 67: Link has been severed
MySQL OS Error Code 68: Advertise error
MySQL OS Error Code 69: Srmount error
MySQL OS Error Code 70: Communication error on send
MySQL OS Error Code 71: Protocol error
MySQL OS Error Code 72: Multihop attempted
MySQL OS Error Code 73: RFS specific error
MySQL OS Error Code 74: Bad message
MySQL OS Error Code 75: Value too large for defined data type
MySQL OS Error Code 76: Name not unique on network
MySQL OS Error Code 77: File descriptor in bad state
MySQL OS Error Code 78: Remote address changed
MySQL OS Error Code 79: Can not access a needed shared library
MySQL OS Error Code 80: Accessing a corrupted shared library
MySQL OS Error Code 81: .lib section in a.out corrupted
MySQL OS Error Code 82: Attempting to link in too many shared libraries
MySQL OS Error Code 83: Cannot exec a shared library directly
MySQL OS Error Code 84: Invalid or incomplete multibyte or wide character
MySQL OS Error Code 85: Interrupted system call should be restarted
MySQL OS Error Code 86: Streams pipe error
MySQL OS Error Code 87: Too many users
MySQL OS Error Code 88: Socket operation on non-socket
MySQL OS Error Code 89: Destination address required
MySQL OS Error Code 90: Message too long
MySQL OS Error Code 91: Protocol wrong type for socket
MySQL OS Error Code 92: Protocol not available
MySQL OS Error Code 93: Protocol not supported
MySQL OS Error Code 94: Socket type not supported
MySQL OS Error Code 95: Operation not supported
MySQL OS Error Code 96: Protocol family not supported
MySQL OS Error Code 97: Address family not supported by protocol
MySQL OS Error Code 98: Address already in use
MySQL OS Error Code 99: Cannot assign requested address
MySQL OS Error Code 100: Network is down
MySQL OS Error Code 101: Network is unreachable
MySQL OS Error Code 102: Network dropped connection on reset
MySQL OS Error Code 103: Software caused connection abort
MySQL OS Error Code 104: Connection reset by peer
MySQL OS Error Code 105: No buffer space available
MySQL OS Error Code 106: Transport endpoint is already connected
MySQL OS Error Code 107: Transport endpoint is not connected
MySQL OS Error Code 108: Cannot send after transport endpoint shutdown
MySQL OS Error Code 109: Too many references: cannot splice
MySQL OS Error Code 110: Connection timed out
MySQL OS Error Code 111: Connection refused
MySQL OS Error Code 112: Host is down
MySQL OS Error Code 113: No route to host
MySQL OS Error Code 114: Operation already in progress
MySQL OS Error Code 115: Operation now in progress
MySQL OS Error Code 116: Stale NFS file handle
MySQL OS Error Code 117: Structure needs cleaning
MySQL OS Error Code 118: Not a XENIX named type file
MySQL OS Error Code 119: No XENIX semaphores available
MySQL OS Error Code 120: Is a named type file
MySQL OS Error Code 121: Remote I/O error
MySQL OS Error Code 122: Disk quota exceeded
MySQL OS Error Code 123: No medium found
MySQL OS Error Code 124: Wrong medium type
MySQL OS Error Code 125: Operation canceled

MySQL Error Code 126: Index file is crashed
MySQL Error Code 127: Record-file is crashed
MySQL Error Code 128: Out of memory
MySQL Error Code 130: Incorrect file format
MySQL Error Code 131: Command not supported by database
MySQL Error Code 132: Old database file
MySQL Error Code 133: No record read before update
MySQL Error Code 134: Record was already deleted (or record file crashed)
MySQL Error Code 135: No more room in record file
MySQL Error Code 136: No more room in index file
MySQL Error Code 137: No more records (read after end of file)
MySQL Error Code 138: Unsupported extension used for table
MySQL Error Code 139: Too big row
MySQL Error Code 140: Wrong create options
MySQL Error Code 141: Duplicate unique key or constraint on write or update
MySQL Error Code 142: Unknown character set used
MySQL Error Code 143: Conflicting table definitions in sub-tables of MERGE table
MySQL Error Code 144: Table is crashed and last repair failed
MySQL Error Code 145: Table was marked as crashed and should be repaired
MySQL Error Code 146: Lock timed out; Retry transaction
MySQL Error Code 147: Lock table is full; Restart program with a larger locktable
MySQL Error Code 148: Updates are not allowed under a read only transactions
MySQL Error Code 149: Lock deadlock; Retry transaction
MySQL Error Code 150: Foreign key constraint is incorrectly formed
MySQL Error Code 151: Cannot add a child row
MySQL Error Code 152: Cannot delete a parent row

MySQL Server Error Code 1000: hashchk
MySQL Server Error Code 1001: isamchk
MySQL Server Error Code 1002: NO
MySQL Server Error Code 1003: YES
MySQL Server Error Code 1004: Can’t create file ‘%s’ errno: %d
MySQL Server Error Code 1005: Can’t create table ‘%s’ errno: %d
MySQL Server Error Code 1006: Can’t create database ‘%s’ errno: %d
MySQL Server Error Code 1007: Can’t create database ‘%s’; database exists
MySQL Server Error Code 1008: Can’t drop database ‘%s’; database doesn’t exist
MySQL Server Error Code 1009: Error dropping database can’t delete ‘%s’, errno: %d
MySQL Server Error Code 1010: Error dropping database can’t rmdir ‘%s’, errno: %d
MySQL Server Error Code 1011: Error on delete of ‘%s’ errno: %d
MySQL Server Error Code 1012: Can’t read record in system table
MySQL Server Error Code 1013: Can’t get status of ‘%s’ errno: %d
MySQL Server Error Code 1014: Can’t get working directory errno: %d
MySQL Server Error Code 1015: Can’t lock file errno: %d
MySQL Server Error Code 1016: Can’t open file: ‘%s’ errno: %d
MySQL Server Error Code 1017: Can’t find file: ‘%s’ errno: %d
MySQL Server Error Code 1018: Can’t read dir of ‘%s’ errno: %d
MySQL Server Error Code 1019: Can’t change dir to ‘%s’ errno: %d
MySQL Server Error Code 1020: Record has changed since last read in table ‘%s’
MySQL Server Error Code 1021: Disk full %s; waiting for someone to free some space…
MySQL Server Error Code 1022: Can’t write; duplicate key in table ‘%s’
MySQL Server Error Code 1023: Error on close of ‘%s’ errno: %d
MySQL Server Error Code 1024: Error reading file ‘%s’ errno: %d
MySQL Server Error Code 1025: Error on rename of ‘%s’ to ‘%s’ errno: %d
MySQL Server Error Code 1026: Error writing file ‘%s’ errno: %d
MySQL Server Error Code 1027: ‘%s’ is locked against change
MySQL Server Error Code 1028: Sort aborted
MySQL Server Error Code 1029: View ‘%s’ doesn’t exist for ‘%s’
MySQL Server Error Code 1030: Got error %d from storage engine
MySQL Server Error Code 1031: Table storage engine for ‘%s’ doesn’t have this option
MySQL Server Error Code 1032: Can’t find record in ‘%s’
MySQL Server Error Code 1033: Incorrect information in file: ‘%s’
MySQL Server Error Code 1034: Incorrect key file for table ‘%s’; try to repair it
MySQL Server Error Code 1035: Old key file for table ‘%s’; repair it!
MySQL Server Error Code 1036: Table ‘%s’ is read only
MySQL Server Error Code 1037: Out of memory; restart server and try again needed %d bytes
MySQL Server Error Code 1038: Out of sort memory; increase server sort buffer size
MySQL Server Error Code 1039: Unexpected EOF found when reading file ‘%s’ errno: %d
MySQL Server Error Code 1040: Too many connections
MySQL Server Error Code 1041: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use ‘ulimit’ to allow mysqld to use more memory or you can add more swap space
MySQL Server Error Code 1042: Can’t get hostname for your address
MySQL Server Error Code 1043: Bad handshake
MySQL Server Error Code 1044: Access denied for user ‘%s’@’%s’ to database ‘%s’
MySQL Server Error Code 1045: Access denied for user ‘%s’@’%s’ using password: %s
MySQL Server Error Code 1046: No database selected
MySQL Server Error Code 1047: Unknown command
MySQL Server Error Code 1048: Column ‘%s’ cannot be null
MySQL Server Error Code 1049: Unknown database ‘%s’
MySQL Server Error Code 1050: Table ‘%s’ already exists
MySQL Server Error Code 1051: Unknown table ‘%s’
MySQL Server Error Code 1052: Column ‘%s’ in %s is ambiguous
MySQL Server Error Code 1053: Server shutdown in progress
MySQL Server Error Code 1054: Unknown column ‘%s’ in ‘%s’
MySQL Server Error Code 1055: ‘%s’ isn’t in GROUP BY
MySQL Server Error Code 1056: Can’t group on ‘%s’
MySQL Server Error Code 1057: Statement has sum functions and columns in same statement
MySQL Server Error Code 1058: Column count doesn’t match value count
MySQL Server Error Code 1059: Identifier name ‘%s’ is too long
MySQL Server Error Code 1060: Duplicate column name ‘%s’
MySQL Server Error Code 1061: Duplicate key name ‘%s’
MySQL Server Error Code 1062: Duplicate entry ‘%s’ for key %d
MySQL Server Error Code 1063: Incorrect column specifier for column ‘%s’
MySQL Server Error Code 1064: %s near ‘%s’ at line %d
MySQL Server Error Code 1065: Query was empty
MySQL Server Error Code 1066: Not unique table/alias: ‘%s’
MySQL Server Error Code 1067: Invalid default value for ‘%s’
MySQL Server Error Code 1068: Multiple primary key defined
MySQL Server Error Code 1069: Too many keys specified; max %d keys allowed
MySQL Server Error Code 1070: Too many key parts specified; max %d parts allowed
MySQL Server Error Code 1071: Specified key was too long; max key length is %d bytes
MySQL Server Error Code 1072: Key column ‘%s’ doesn’t exist in table
MySQL Server Error Code 1073: BLOB column ‘%s’ can’t be used in key specification with the used table type
MySQL Server Error Code 1074: Column length too big for column ‘%s’ max = %d; use BLOB instead
MySQL Server Error Code 1075: Incorrect table definition; there can be only one auto column and it must be defined as a key
MySQL Server Error Code 1076: %s: ready for connections. Version: ‘%s’ socket: ‘%s’ port: %d
MySQL Server Error Code 1077: %s: Normal shutdown
MySQL Server Error Code 1078: %s: Got signal %d. Aborting!
MySQL Server Error Code 1079: %s: Shutdown complete
MySQL Server Error Code 1080: %s: Forcing close of thread %ld user: ‘%s’
MySQL Server Error Code 1081: Can’t create IP socket
MySQL Server Error Code 1082: Table ‘%s’ has no index like the one used in CREATE INDEX; recreate the table
MySQL Server Error Code 1083: Field separator argument is not what is expected; check the manual
MySQL Server Error Code 1084: You can’t use fixed rowlength with BLOBs; please use ‘fields terminated by’
MySQL Server Error Code 1085: The file ‘%s’ must be in the database directory or be readable by all
MySQL Server Error Code 1086: File ‘%s’ already exists
MySQL Server Error Code 1087: Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld
MySQL Server Error Code 1088: Records: %ld Duplicates: %ld
MySQL Server Error Code 1089: Incorrect sub part key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique sub keys
MySQL Server Error Code 1090: You can’t delete all columns with ALTER TABLE; use DROP TABLE instead
MySQL Server Error Code 1091: Can’t DROP ‘%s’; check that column/key exists
MySQL Server Error Code 1092: Records: %ld Duplicates: %ld Warnings: %ld
MySQL Server Error Code 1093: You can’t specify target table ‘%s’ for update in FROM clause
MySQL Server Error Code 1094: Unknown thread id: %lu
MySQL Server Error Code 1095: You are not owner of thread %lu
MySQL Server Error Code 1096: No tables used
MySQL Server Error Code 1097: Too many strings for column %s and SET
MySQL Server Error Code 1098: Can’t generate a unique log-filename %s.1-999
MySQL Server Error Code 1099: Table ‘%s’ was locked with a READ lock and can’t be updated
MySQL Server Error Code 1100: Table ‘%s’ was not locked with LOCK TABLES
MySQL Server Error Code 1101: BLOB/TEXT column ‘%s’ can’t have a default value
MySQL Server Error Code 1102: Incorrect database name ‘%s’
MySQL Server Error Code 1103: Incorrect table name ‘%s’
MySQL Server Error Code 1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
MySQL Server Error Code 1105: Unknown error
MySQL Server Error Code 1106: Unknown procedure ‘%s’
MySQL Server Error Code 1107: Incorrect parameter count to procedure ‘%s’
MySQL Server Error Code 1108: Incorrect parameters to procedure ‘%s’
MySQL Server Error Code 1109: Unknown table ‘%s’ in %s
MySQL Server Error Code 1110: Column ‘%s’ specified twice
MySQL Server Error Code 1111: Invalid use of group function
MySQL Server Error Code 1112: Table ‘%s’ uses an extension that doesn’t exist in this MySQL version
MySQL Server Error Code 1113: A table must have at least 1 column
MySQL Server Error Code 1114: The table ‘%s’ is full
MySQL Server Error Code 1115: Unknown character set: ‘%s’
MySQL Server Error Code 1116: Too many tables; MySQL can only use %d tables in a join
MySQL Server Error Code 1117: Too many columns
MySQL Server Error Code 1118: Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs
MySQL Server Error Code 1119: Thread stack overrun: Used: %ld of a %ld stack. Use ‘mysqld -O thread_stack=#’ to specify a bigger stack if needed
MySQL Server Error Code 1120: Cross dependency found in OUTER JOIN; examine your ON conditions
MySQL Server Error Code 1121: Column ‘%s’ is used with UNIQUE or INDEX but is not defined as NOT NULL
MySQL Server Error Code 1122: Can’t load function ‘%s’
MySQL Server Error Code 1123: Can’t initialize function ‘%s’; %s
MySQL Server Error Code 1124: No paths allowed for shared library
MySQL Server Error Code 1125: Function ‘%s’ already exists
MySQL Server Error Code 1126: Can’t open shared library ‘%s’ errno: %d %s
MySQL Server Error Code 1127: Can’t find function ‘%s’ in library’
MySQL Server Error Code 1128: Function ‘%s’ is not defined
MySQL Server Error Code 1129: Host ‘%s’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
MySQL Server Error Code 1130: Host ‘%s’ is not allowed to connect to this MySQL server
MySQL Server Error Code 1131: You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords
MySQL Server Error Code 1132: You must have privileges to update tables in the mysql database to be able to change passwords for others
MySQL Server Error Code 1133: Can’t find any matching row in the user table
MySQL Server Error Code 1134: Rows matched: %ld Changed: %ld Warnings: %ld
MySQL Server Error Code 1135: Can’t create a new thread errno %d; if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
MySQL Server Error Code 1136: Column count doesn’t match value count at row %ld
MySQL Server Error Code 1137: Can’t reopen table: ‘%s’
MySQL Server Error Code 1138: Invalid use of NULL value
MySQL Server Error Code 1139: Got error ‘%s’ from regexp
MySQL Server Error Code 1140: Mixing of GROUP columns MIN,MAX,COUNT,… with no GROUP columns is illegal if there is no GROUP BY clause
MySQL Server Error Code 1141: There is no such grant defined for user ‘%s’ on host ‘%s’
MySQL Server Error Code 1142: %s command denied to user ‘%s’@’%s’ for table ‘%s’
MySQL Server Error Code 1143: %s command denied to user ‘%s’@’%s’ for column ‘%s’ in table ‘%s’
MySQL Server Error Code 1144: Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used
MySQL Server Error Code 1145: The host or user argument to GRANT is too long
MySQL Server Error Code 1146: Table ‘%s.%s’ doesn’t exist
MySQL Server Error Code 1147: There is no such grant defined for user ‘%s’ on host ‘%s’ on table ‘%s’
MySQL Server Error Code 1148: The used command is not allowed with this MySQL version
MySQL Server Error Code 1149: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
MySQL Server Error Code 1150: Delayed insert thread couldn’t get requested lock for table %s
MySQL Server Error Code 1151: Too many delayed threads in use
MySQL Server Error Code 1152: Aborted connection %ld to db: ‘%s’ user: ‘%s’ %s
MySQL Server Error Code 1153: Got a packet bigger than ‘max_allowed_packet’ bytes
MySQL Server Error Code 1154: Got a read error from the connection pipe
MySQL Server Error Code 1155: Got an error from fcntl
MySQL Server Error Code 1156: Got packets out of order
MySQL Server Error Code 1157: Couldn’t uncompress communication packet
MySQL Server Error Code 1158: Got an error reading communication packets
MySQL Server Error Code 1159: Got timeout reading communication packets
MySQL Server Error Code 1160: Got an error writing communication packets
MySQL Server Error Code 1161: Got timeout writing communication packets
MySQL Server Error Code 1162: Result string is longer than ‘max_allowed_packet’ bytes
MySQL Server Error Code 1163: The used table type doesn’t support BLOB/TEXT columns
MySQL Server Error Code 1164: The used table type doesn’t support AUTO_INCREMENT columns
MySQL Server Error Code 1165: INSERT DELAYED can’t be used with table ‘%s’ because it is locked with LOCK TABLES
MySQL Server Error Code 1166: Incorrect column name ‘%s’
MySQL Server Error Code 1167: The used storage engine can’t index column ‘%s’
MySQL Server Error Code 1168: All tables in the MERGE table are not identically defined
MySQL Server Error Code 1169: Can’t write, because of unique constraint, to table ‘%s’
MySQL Server Error Code 1170: BLOB/TEXT column ‘%s’ used in key specification without a key length
MySQL Server Error Code 1171: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
MySQL Server Error Code 1172: Result consisted of more than one row
MySQL Server Error Code 1173: This table type requires a primary key
MySQL Server Error Code 1174: This version of MySQL is not compiled with RAID support
MySQL Server Error Code 1175: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
MySQL Server Error Code 1176: Key ‘%s’ doesn’t exist in table ‘%s’
MySQL Server Error Code 1177: Can’t open table
MySQL Server Error Code 1178: The storage engine for the table doesn’t support %s
MySQL Server Error Code 1179: You are not allowed to execute this command in a transaction
MySQL Server Error Code 1180: Got error %d during COMMIT
MySQL Server Error Code 1181: Got error %d during ROLLBACK
MySQL Server Error Code 1182: Got error %d during FLUSH_LOGS
MySQL Server Error Code 1183: Got error %d during CHECKPOINT
MySQL Server Error Code 1184: Aborted connection %ld to db: ‘%s’ user: ‘%s’ host: `%s’ %s
MySQL Server Error Code 1185: The storage engine for the table does not support binary table dump
MySQL Server Error Code 1186: Binlog closed, cannot RESET MASTER
MySQL Server Error Code 1187: Failed rebuilding the index of dumped table ‘%s’
MySQL Server Error Code 1188: Error from master: ‘%s’
MySQL Server Error Code 1189: Net error reading from master
MySQL Server Error Code 1190: Net error writing to master
MySQL Server Error Code 1191: Can’t find FULLTEXT index matching the column list
MySQL Server Error Code 1192: Can’t execute the given command because you have active locked tables or an active transaction
MySQL Server Error Code 1193: Unknown system variable ‘%s’
MySQL Server Error Code 1194: Table ‘%s’ is marked as crashed and should be repaired
MySQL Server Error Code 1195: Table ‘%s’ is marked as crashed and last automatic? repair failed
MySQL Server Error Code 1196: Some non-transactional changed tables couldn’t be rolled back
MySQL Server Error Code 1197: Multi-statement transaction required more than ‘max_binlog_cache_size’ bytes of storage; increase this mysqld variable and try again
MySQL Server Error Code 1198: This operation cannot be performed with a running slave; run STOP SLAVE first
MySQL Server Error Code 1199: This operation requires a running slave; configure slave and do START SLAVE
MySQL Server Error Code 1200: The server is not configured as slave; fix in config file or with CHANGE MASTER TO
MySQL Server Error Code 1201: Could not initialize master info structure; more error messages can be found in the MySQL error log
MySQL Server Error Code 1202: Could not create slave thread; check system resources
MySQL Server Error Code 1203: User %s has already more than ‘max_user_connections’ active connections
MySQL Server Error Code 1204: You may only use constant expressions with SET
MySQL Server Error Code 1205: Lock wait timeout exceeded; try restarting transaction
MySQL Server Error Code 1206: The total number of locks exceeds the lock table size
MySQL Server Error Code 1207: Update locks cannot be acquired during a READ UNCOMMITTED transaction
MySQL Server Error Code 1208: DROP DATABASE not allowed while thread is holding global read lock
MySQL Server Error Code 1209: CREATE DATABASE not allowed while thread is holding global read lock
MySQL Server Error Code 1210: Incorrect arguments to %s
MySQL Server Error Code 1211: ‘%s’@’%s’ is not allowed to create new users
MySQL Server Error Code 1212: Incorrect table definition; all MERGE tables must be in the same database
MySQL Server Error Code 1213: Deadlock found when trying to get lock; try restarting transaction
MySQL Server Error Code 1214: The used table type doesn’t support FULLTEXT indexes
MySQL Server Error Code 1215: Cannot add foreign key constraint
MySQL Server Error Code 1216: Cannot add or update a child row: a foreign key constraint fails
MySQL Server Error Code 1217: Cannot delete or update a parent row: a foreign key constraint fails
MySQL Server Error Code 1218: Error connecting to master: %s
MySQL Server Error Code 1219: Error running query on master: %s
MySQL Server Error Code 1220: Error when executing command %s: %s
MySQL Server Error Code 1221: Incorrect usage of %s and %s
MySQL Server Error Code 1222: The used SELECT statements have a different number of columns
MySQL Server Error Code 1223: Can’t execute the query because you have a conflicting read lock
MySQL Server Error Code 1224: Mixing of transactional and non-transactional tables is disabled
MySQL Server Error Code 1225: Option ‘%s’ used twice in statement
MySQL Server Error Code 1226: User ‘%s’ has exceeded the ‘%s’ resource current value: %ld
MySQL Server Error Code 1227: Access denied; you need the %s privilege for this operation
MySQL Server Error Code 1228: Variable ‘%s’ is a SESSION variable and can’t be used with SET GLOBAL
MySQL Server Error Code 1229: Variable ‘%s’ is a GLOBAL variable and should be set with SET GLOBAL
MySQL Server Error Code 1230: Variable ‘%s’ doesn’t have a default value
MySQL Server Error Code 1231: Variable ‘%s’ can’t be set to the value of ‘%s’
MySQL Server Error Code 1232: Incorrect argument type to variable ‘%s’
MySQL Server Error Code 1233: Variable ‘%s’ can only be set, not read
MySQL Server Error Code 1234: Incorrect usage/placement of ‘%s’
MySQL Server Error Code 1235: This version of MySQL doesn’t yet support ‘%s’
MySQL Server Error Code 1236: Got fatal error %d: ‘%s’ from master when reading data from binary log
MySQL Server Error Code 1237: Slave SQL thread ignored the query because of replicate-*-table rules
MySQL Server Error Code 1238: Variable ‘%s’ is a %s variable
MySQL Server Error Code 1239: Incorrect foreign key definition for ‘%s’: %s
MySQL Server Error Code 1240: Key reference and table reference don’t match
MySQL Server Error Code 1241: Operand should contain %d columns
MySQL Server Error Code 1242: Subquery returns more than 1 row
MySQL Server Error Code 1243: Unknown prepared statement handler %.*s given to %s
MySQL Server Error Code 1244: Help database is corrupt or does not exist
MySQL Server Error Code 1245: Cyclic reference on subqueries
MySQL Server Error Code 1246: Converting column ‘%s’ from %s to %s
MySQL Server Error Code 1247: Reference ‘%s’ not supported %s
MySQL Server Error Code 1248: Every derived table must have its own alias
MySQL Server Error Code 1249: Select %u was reduced during optimization
MySQL Server Error Code 1250: Table ‘%s’ from one of the SELECTs cannot be used in %s
MySQL Server Error Code 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client
MySQL Server Error Code 1252: All parts of a SPATIAL index must be NOT NULL
MySQL Server Error Code 1253: COLLATION ‘%s’ is not valid for CHARACTER SET ‘%s’
MySQL Server Error Code 1254: Slave is already running
MySQL Server Error Code 1255: Slave has already been stopped
MySQL Server Error Code 1256: Uncompressed data size too large; the maximum size is %d probably, length of uncompressed data was corrupted
MySQL Server Error Code 1257: ZLIB: Not enough memory
MySQL Server Error Code 1258: ZLIB: Not enough room in the output buffer probably, length of uncompressed data was corrupted
MySQL Server Error Code 1259: ZLIB: Input data corrupted
MySQL Server Error Code 1260: %d lines were cut by GROUP_CONCAT
MySQL Server Error Code 1261: Row %ld doesn’t contain data for all columns
MySQL Server Error Code 1262: Row %ld was truncated; it contained more data than there were input columns
MySQL Server Error Code 1263: Column set to default value; NULL supplied to NOT NULL column ‘%s’ at row %ld
MySQL Server Error Code 1264: Out of range value adjusted for column ‘%s’ at row %ld
MySQL Server Error Code 1265: Data truncated for column ‘%s’ at row %ld
MySQL Server Error Code 1266: Using storage engine %s for table ‘%s’
MySQL Server Error Code 1267: Illegal mix of collations %s,%s and %s,%s for operation ‘%s’
MySQL Server Error Code 1268: Can’t drop one or more of the requested users
MySQL Server Error Code 1269: Can’t revoke all privileges, grant for one or more of the requested users
MySQL Server Error Code 1270: Illegal mix of collations %s,%s, %s,%s, %s,%s for operation ‘%s’
MySQL Server Error Code 1271: Illegal mix of collations for operation ‘%s’
MySQL Server Error Code 1272: Variable ‘%s’ is not a variable component can’t be used as XXXX.variable_name
MySQL Server Error Code 1273: Unknown collation: ‘%s’
MySQL Server Error Code 1274: SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started
MySQL Server Error Code 1275: Server is running in –secure-auth mode, but ‘%s’@’%s’ has a password in the old format; please change the password to the new format
MySQL Server Error Code 1276: Field or reference ‘%s%s%s%s%s’ of SELECT #%d was resolved in SELECT #%d
MySQL Server Error Code 1277: Incorrect parameter or combination of parameters for START SLAVE UNTIL
MySQL Server Error Code 1278: It is recommended to use –skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave’s mysqld restart
MySQL Server Error Code 1279: SQL thread is not to be started so UNTIL options are ignored
MySQL Server Error Code 1280: Incorrect index name ‘%s’
MySQL Server Error Code 1281: Incorrect catalog name ‘%s’
MySQL Server Error Code 1282: Query cache failed to set size %lu; new query cache size is %lu
MySQL Server Error Code 1283: Column ‘%s’ cannot be part of FULLTEXT index
MySQL Server Error Code 1284: Unknown key cache ‘%s’
MySQL Server Error Code 1285: MySQL is started in –skip-name-resolve mode; you must restart it without this switch for this grant to work
MySQL Server Error Code 1286: Unknown table engine ‘%s’
MySQL Server Error Code 1287: ‘%s’ is deprecated; use ‘%s’ instead
MySQL Server Error Code 1288: The target table %s of the %s is not updatable
MySQL Server Error Code 1289: The ‘%s’ feature is disabled; you need MySQL built with ‘%s’ to have it working
MySQL Server Error Code 1290: The MySQL server is running with the %s option so it cannot execute this statement
MySQL Server Error Code 1291: Column ‘%s’ has duplicated value ‘%s’ in %s
MySQL Server Error Code 1292: Truncated incorrect %s value: ‘%s’
MySQL Server Error Code 1293: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
MySQL Server Error Code 1294: Invalid ON UPDATE clause for ‘%s’ column
MySQL Server Error Code 1295: This command is not supported in the prepared statement protocol yet
MySQL Server Error Code 1296: Got error %d ‘%s’ from %s
MySQL Server Error Code 1297: Got temporary error %d ‘%s’ from %s
MySQL Server Error Code 1298: Unknown or incorrect time zone: ‘%s’
MySQL Server Error Code 1299: Invalid TIMESTAMP value in column ‘%s’ at row %ld
MySQL Server Error Code 1300: Invalid %s character string: ‘%s’
MySQL Server Error Code 1301: Result of %s was larger than max_allowed_packet %ld – truncated
MySQL Server Error Code 1302: Conflicting declarations: ‘%s%s’ and ‘%s%s’
MySQL Server Error Code 1303: Can’t create a %s from within another stored routine
MySQL Server Error Code 1304: %s %s already exists
MySQL Server Error Code 1305: %s %s does not exist
MySQL Server Error Code 1306: Failed to DROP %s %s
MySQL Server Error Code 1307: Failed to CREATE %s %s
MySQL Server Error Code 1308: %s with no matching label: %s
MySQL Server Error Code 1309: Redefining label %s
MySQL Server Error Code 1310: End-label %s without match
MySQL Server Error Code 1311: Referring to uninitialized variable %s
MySQL Server Error Code 1312: SELECT in a stored procedure must have INTO
MySQL Server Error Code 1313: RETURN is only allowed in a FUNCTION
MySQL Server Error Code 1314: Statements like SELECT, INSERT, UPDATE and others are not allowed in a FUNCTION
MySQL Server Error Code 1315: The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
MySQL Server Error Code 1316: The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN
MySQL Server Error Code 1317: Query execution was interrupted
MySQL Server Error Code 1318: Incorrect number of arguments for %s %s; expected %u, got %u
MySQL Server Error Code 1319: Undefined CONDITION: %s
MySQL Server Error Code 1320: No RETURN found in FUNCTION %s
MySQL Server Error Code 1321: FUNCTION %s ended without RETURN
MySQL Server Error Code 1322: Cursor statement must be a SELECT
MySQL Server Error Code 1323: Cursor SELECT must not have INTO
MySQL Server Error Code 1324: Undefined CURSOR: %s
MySQL Server Error Code 1325: Cursor is already open
MySQL Server Error Code 1326: Cursor is not open
MySQL Server Error Code 1327: Undeclared variable: %s
MySQL Server Error Code 1328: Incorrect number of FETCH variables
MySQL Server Error Code 1329: No data to FETCH
MySQL Server Error Code 1330: Duplicate parameter: %s
MySQL Server Error Code 1331: Duplicate variable: %s
MySQL Server Error Code 1332: Duplicate condition: %s
MySQL Server Error Code 1333: Duplicate cursor: %s
MySQL Server Error Code 1334: Failed to ALTER %s %s
MySQL Server Error Code 1335: Subselect value not supported
MySQL Server Error Code 1336: USE is not allowed in a stored procedure
MySQL Server Error Code 1337: Variable or condition declaration after cursor or handler declaration
MySQL Server Error Code 1338: Cursor declaration after handler declaration
MySQL Server Error Code 1339: Case not found for CASE statement
MySQL Server Error Code 1340: Configuration file ‘%s’ is too big/
MySQL Server Error Code 1341: Malformed file type header in file ‘%s’
MySQL Server Error Code 1342: Unexpected end of file while parsing comment ‘%s’
MySQL Server Error Code 1343: Error while parsing parameter ‘%s’ line: ‘%s’
MySQL Server Error Code 1344: Unexpected end of file while skipping unknown parameter ‘%s’
MySQL Server Error Code 1345: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
MySQL Server Error Code 1346: File ‘%s’ has unknown type ‘%s’ in its header
MySQL Server Error Code 1347: ‘%s.%s’ is not %s
MySQL Server Error Code 1348: Column ‘%s’ is not updatable
MySQL Server Error Code 1349: View’s SELECT contains a subquery in the FROM clause
MySQL Server Error Code 1350: View’s SELECT contains a ‘%s’ clause
MySQL Server Error Code 1351: View’s SELECT contains a variable or parameter
MySQL Server Error Code 1352: View’s SELECT contains a temporary table ‘%s’
MySQL Server Error Code 1353: View’s SELECT and view’s field list have different column counts
MySQL Server Error Code 1354: View merge algorithm can’t be used here for now assumed undefined algorithm
MySQL Server Error Code 1355: View being updated does not have complete key of underlying table in it
MySQL Server Error Code 1356: View ‘%s.%s’ references invalid tables or columns
MySQL Server Error Code 1357: Can’t drop a %s from within another stored routine
MySQL Server Error Code 1358: GOTO is not allowed in a stored procedure handler
MySQL Server Error Code 1359: Trigger already exists
MySQL Server Error Code 1360: Trigger does not exist
MySQL Server Error Code 1361: Trigger’s ‘%s’ is view or temporary table
MySQL Server Error Code 1362: Updating of %s row is not allowed in %strigger
MySQL Server Error Code 1363: There is no %s row in %s trigger
MySQL Server Error Code 1364: Field ‘%s’ doesn’t have a default value
MySQL Server Error Code 1365: Division by 0
MySQL Server Error Code 1366: Incorrect %s value: ‘%s’ for column ‘%s’ at row %ld
MySQL Server Error Code 1367: Illegal %s ‘%s’ value found during parsing
MySQL Server Error Code 1368: CHECK OPTION on non-updatable view ‘%s.%s’
MySQL Server Error Code 1369: CHECK OPTION failed ‘%s.%s’

MySQL Client Error Code 2000: Unknown MySQL error
MySQL Client Error Code 2001: Can’t create UNIX socket %d
MySQL Client Error Code 2002: Can’t connect to local MySQL server through socket ‘%s’ %d
MySQL Client Error Code 2003: Can’t connect to MySQL server on ‘%s’ %d
MySQL Client Error Code 2004: Can’t create TCP/IP socket %d
MySQL Client Error Code 2005: Unknown MySQL server host ‘%s’ %d
MySQL Client Error Code 2006: MySQL server has gone away
MySQL Client Error Code 2007: Protocol mismatch; server version = %d, client version = %d
MySQL Client Error Code 2008: MySQL client ran out of memory
MySQL Client Error Code 2009: Wrong host info
MySQL Client Error Code 2010: Localhost via UNIX socket
MySQL Client Error Code 2011: %s via TCP/IP
MySQL Client Error Code 2012: Error in server handshake
MySQL Client Error Code 2013: Lost connection to MySQL server during query
MySQL Client Error Code 2014: Commands out of sync; you can’t run this command now
MySQL Client Error Code 2015: %s via named pipe
MySQL Client Error Code 2016: Can’t wait for named pipe to host: %s pipe: %s %lu
MySQL Client Error Code 2017: Can’t open named pipe to host: %s pipe: %s %lu
MySQL Client Error Code 2018: Can’t set state of named pipe to host: %s pipe: %s %lu
MySQL Client Error Code 2019: Can’t initialize character set %s path: %s
MySQL Client Error Code 2020: Got packet bigger than ‘max_allowed_packet’ bytes
MySQL Client Error Code 2021: Embedded server
MySQL Client Error Code 2022: Error on SHOW SLAVE STATUS:
MySQL Client Error Code 2023: Error on SHOW SLAVE HOSTS:
MySQL Client Error Code 2024: Error connecting to slave:
MySQL Client Error Code 2025: Error connecting to master:
MySQL Client Error Code 2026: SSL connection error
MySQL Client Error Code 2027: Malformed packet
MySQL Client Error Code 2028: This client library is licensed only for use with MySQL servers having ‘%s’ license
MySQL Client Error Code 2029: Invalid use of null pointer
MySQL Client Error Code 2030: Statement not prepared
MySQL Client Error Code 2031: No data supplied for parameters in prepared statement
MySQL Client Error Code 2032: Data truncated
MySQL Client Error Code 2033: No parameters exist in the statement
MySQL Client Error Code 2034: Invalid parameter number
MySQL Client Error Code 2035: Can’t send long data for non-string/non-binary data types parameter: %d
MySQL Client Error Code 2036: Using unsupported buffer type: %d parameter: %d
MySQL Client Error Code 2037: Shared memory %lu
MySQL Client Error Code 2038: Can’t open shared memory; client could not create request event %lu
MySQL Client Error Code 2039: Can’t open shared memory; no answer event received from server %lu
MySQL Client Error Code 2040: Can’t open shared memory; server could not allocate file mapping %lu
MySQL Client Error Code 2041: Can’t open shared memory; server could not get pointer to file mapping %lu
MySQL Client Error Code 2042: Can’t open shared memory; client could not allocate file mapping %lu
MySQL Client Error Code 2043 Can’t open shared memory; client could not get pointer to file mapping %lu
MySQL Client Error Code 2044: Can’t open shared memory; client could not create %s event %lu
MySQL Client Error Code 2045: Can’t open shared memory; no answer from server %lu
MySQL Client Error Code 2046: Can’t open shared memory; cannot send request event to server %lu
MySQL Client Error Code 2047: Wrong or unknown protocol
MySQL Client Error Code 2048: Invalid connection handle
MySQL Client Error Code 2049: Connection using old pre-4.1.1 authentication protocol refused client option ’secure_auth’ enabled
MySQL Client Error Code 2050 Row retrieval was canceled by mysql_stmt_close call
MySQL Client Error Code 2051: Attempt to read column without prior row fetch

Find it!

Theme Design by devolux.org