[Top]
predef::
Mysql
Mysql.mysql
|
Method Mysql.mysql()->create()
- Method
create
-
void Mysql.mysql()
void Mysql.mysql(string host)
void Mysql.mysql(string host, string database)
void Mysql.mysql(string host, string database, string user)
void Mysql.mysql(string host, string database, string user, string password)
void Mysql.mysql(string host, string database, string user, string password, mapping(string:string|int) options)
- Description
-
Connect to a Mysql database.
To access the Mysql database, you must first connect to it. This is
done with this function.
- Parameter host
-
If you give no argument, or give "" as host it will connect with
a UNIX-domain socket, which can be a big performance gain.
- Parameter options
-
This optional mapping can contain zero or more of the following
parameters:
"init_command" : string | Command to execute on connect.
|
"timeout" : int | Timeout in seconds.
|
"compress" : int(0..1) | Enable compressed protocol.
|
"mysql_config_file" : string | Change config file from "my.cnf".
|
"mysql_group" : string | Specify additional group to read from config file.
|
"mysql_named_pipe" : int(0..1) | Use named pipe to connect to server.
|
"mysql_local_infile" : int(0..1) | Enable use of LOCAL INFILE (security).
|
"mysql_charset_dir" : string | Change charset directory.
|
"mysql_charset_name" : string | Change charset name.
|
|
- Note
-
Some options may not be implemented. Unimplemented options are
silently ignored.
|