MySQL Proxy Scripting
1405
if the content of the Lua script changes while
mysql-proxy
is running, the updated content is
automatically used when a new connection is made.
•
--pid-file=file_name
[1405]
Command-Line Format
--pid-file=file_name
Option-File Format
pid-file=file_name
Permitted Values
Type
file name
The name of the file in which to store the process ID.
•
--user=user_name
[1405]
Command-Line Format
--user=user_name
Option-File Format
user=user_name
Permitted Values
Type
string
Run
mysql-proxy
as the specified
user
.
•
--version
[1405]
,
-V
Command-Line Format
--version
-V
Show the version number.
The most common usage is as a simple proxy service (that is, without additional scripting). For basic
proxy operation, you must specify at least one
proxy-backend-addresses
option to specify the
MySQL server to connect to by default:
shell>
mysql-proxy --proxy-backend-addresses=MySQL.example.com:3306
The default proxy port is
4040
, so you can connect to your MySQL server through the proxy by
specifying the host name and port details:
shell>
mysql --host=localhost --port=4040
If your server requires authentication information, this will be passed through natively without alteration
by
mysql-proxy
, so you must also specify the required authentication information:
shell>
mysql --host=localhost --port=4040 \
--user=user_name --password=password
You can also connect to a read-only port (which filters out
UPDATE
and
INSERT
queries) by connecting
to the read-only port. By default the host name is the default, and the port is
4042
, but you can alter the
host/port information by using the
--proxy-read-only-backend-addresses
[1403]
command-
line option.
For more detailed information on how to use these command-line options, and
mysql-proxy
in
general in combination with Lua scripts, see
Section 15.7.5, “Using MySQL Proxy”
.
15.7.4. MySQL Proxy Scripting
You can control how MySQL Proxy manipulates and works with the queries and results that are passed
on to the MySQL server through the use of the embedded Lua scripting language. You can find out
more about the Lua programming language from the
Lua Web site
.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...