Error
Error Code: 1003

MariaDB Error 1003: Unexpected Client Signal

📦 MariaDB
📋

Description

This error code (1003) with the message "YES" is an infrequent and often misleading occurrence in MariaDB. It typically indicates that a client application or library has misinterpreted an internal server communication signal, such as a successful connection acknowledgment or a specific protocol handshake, as an error condition rather than its intended non-error status. This is rarely a direct server-generated issue.
💬

Error Message

YES
🔍

Known Causes

3 known causes
⚠️
Client Library Mismatch
An outdated or incompatible client connector library (e.g., Connector/J, PHP PDO, Node.js driver) is used with the MariaDB server, leading to misinterpretation of protocol messages.
⚠️
Application Code Misinterpretation
The application's error handling logic is incorrectly configured to treat the internal `ER_YES` signal (which can signify a positive outcome or specific state) as an actual error.
⚠️
Network or Proxy Interference
Less commonly, network issues, firewalls, or proxy servers might alter or misdirect communication packets, causing the client to receive an unexpected "YES" signal.
🛠️

Solutions

3 solutions available

1. Update Client Library easy

Upgrade to a compatible MariaDB client connector

1
For PHP, update the MySQL/MariaDB extension
sudo apt-get install php-mysql
sudo systemctl restart apache2
2
For Python, update mysql-connector or PyMySQL
pip install --upgrade mysql-connector-python
# or
pip install --upgrade PyMySQL
3
For Node.js, update mysql2 package
npm update mysql2
4
For Java, update MariaDB Connector/J
<!-- Maven dependency -->
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>3.1.4</version>
</dependency>

2. Fix Application Error Handling medium

Update code to properly handle ER_YES signal

1
In PHP, check for error code 1003 specifically
try {
    $result = $pdo->query($sql);
} catch (PDOException $e) {
    if ($e->getCode() == 1003) {
        // This might be a false positive, log and continue
        error_log('Received ER_YES signal: ' . $e->getMessage());
    } else {
        throw $e;
    }
}
2
In Python, handle the specific error
import mysql.connector
from mysql.connector import Error

try:
    cursor.execute(query)
except Error as e:
    if e.errno == 1003:
        # ER_YES - may not be actual error
        logging.warning(f'ER_YES received: {e}')
    else:
        raise

3. Check Network Configuration medium

Verify network path between client and server

1
Test direct connection to MariaDB
mysql -h your_server -u username -p -e "SELECT 1;"
2
Check if proxy is modifying packets
# Bypass proxy temporarily
mysql -h server_ip --skip-ssl -u username -p
3
Verify firewall isn't interfering
sudo iptables -L -n | grep 3306
sudo ufw status | grep 3306
🔗

Related Errors

5 related errors