mysql_error
mysql_error returns the error message string for the most recent failed MariaDB Connector/C function call, or an empty string if no error occurred.
Syntax
const char * mysql_error(MYSQL * mysql);Parameter
mysql- a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().
Description
Returns the last error message for the most recent function call that can succeed or fail. If no error occurred an empty string is returned.
See Also
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

