C API Function Descriptions
2146
The MySQL server has gone away.
•
CR_SERVER_LOST
[2942]
The connection to the server was lost during the query.
•
CR_UNKNOWN_ERROR
[2941]
An unknown error occurred.
•
ER_UNKNOWN_COM_ERROR
[2914]
The MySQL server doesn't implement this command (probably an old server).
•
ER_ACCESS_DENIED_ERROR
[2913]
The user or password was wrong.
•
ER_BAD_DB_ERROR
[2914]
The database didn't exist.
•
ER_DBACCESS_DENIED_ERROR
[2913]
The user did not have access rights to the database.
•
ER_WRONG_DB_NAME
[2917]
The database name was too long.
Example
if (mysql_change_user(&mysql, "user", "password", "new_database"))
{
fprintf(stderr, "Failed to change user. Error: %s\n",
mysql_error(&mysql));
}
20.6.6.4.
mysql_character_set_name()
const char *mysql_character_set_name(MYSQL *mysql)
Description
Returns the default character set name for the current connection.
Return Values
The default character set name
Errors
None.
20.6.6.5.
mysql_close()
void mysql_close(MYSQL *mysql)
Description
Closes a previously opened connection.
mysql_close()
also deallocates the connection
handle pointed to by
mysql
if the handle was allocated automatically by
mysql_init()
or
mysql_connect()
.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...