Quantcast
Channel: MySQL Forums - Router & Proxy
Viewing all 344 articles
Browse latest View live

mysql-proxy package for RHEL7 is broken (0.8.5-2.el7) (no replies)

$
0
0
As far as I can tell, the RPM package for RHEL7 / systemd is broken. It will not start. Can someone point me in the direction of the spec file and/or package maintainers? I promise not to shoot them.

There are at least two big problems. First: the init.d script has an incompatible syntax with the systemd scripting:
[ ${NETWORKING} = "no" ] && exit 0
needs to be changed in case the NETWORKING variable is undefined. Easy fix: use [[ ]] or double-quote NETWORKING.

Second, the changes in the script from 0.85-1.el6 to 0.85-2.el7 are silly and pointless, are they not? The 1.el6 release relies completely on the /etc/mysql-proxy.cnf file while the 0.85-2.el7 relies entirely on the sysconfig/mysql-proxy file, which would be fine if it weren't for the fact that the provided default options *do not work*.

Please don't check defaults-file for regular-file (no replies)

$
0
0
mysql-proxy --defaults-file=/dev/null
2015-11-18 10:52:54: (critical) mysql-proxy-cli.c:326: loading config from '/dev/null' failed: /dev/null isn't a regular file

This is known as over-engineering. If the file doesn't exist, mysql-proxy complains and exits. Maybe that's ok. But if so, /dev/null should be treated like any other file. Why would you do this? I guess to make sure the file isn't a directory, but that's not that useful.

Connection pooling using MySQL Proxy (no replies)

$
0
0
Hi all,

I need to use connection pooling and routing on top of mysql 5.7.9 in production setup.
Can you suggest me whether i can use MySQL proxy? If not, suggest me any open source tool to achieve it in production?

Best Regards,
SK

MySQL proxy Issue in load balancing (no replies)

$
0
0
I have installed MySQL-Proxy (mysql-proxy-0.8.5-windows-x86-32bit) on my windows server (64 Bit Windows Server 2008 R2) and have tried to do the roud-robin load balancing. For this is have provided two proxy-backend-addresses in the configuration file but I have observed that It only connect the first mysql server and did not forward the load on the second mysql server.

I am also not able to connect the proxy admin. I provide the following command to connect the proxy admin:

`mysql -h 198.xx.xxx.xxx -u admin -p admin -P 4041`

Below is mysql-proxy configuration files. I run the mysql-proxy on the DOS command prompt using the following command:

`mysql -uroot -h198.xx.xxx.xxx -p -P 4040`

mysql-proxy configuration files:

[mysql-proxy]
--daemon=true
--proxy-address=198.xx.xxx.xxx:4040
--log-file="C:\Program Files\MySQL\mysql-proxy\log\mysql-proxy.log"
--admin-lua-script="C:\Program Files\MySQL\mysql-proxy\lib\mysql-proxy\lua\admin.lua"
--admin-address=198.xx.xxx.xxx:4041
--admin-username=admin
--admin-password=admin
--log-level=debug
--plugins=proxy
--plugins=admin
--proxy-backend-addresses=198.xx.xxx.xxx:3306
--proxy-backend-addresses=198.xxx.xxx.xx:3307
--proxy-lua-script="C:\Program Files\MySQL\mysql-proxy\lib\mysql-proxy\lua\proxy\rw-splitting.lua"
--keepalive=true

Can anyone please help on this and suggest where I did mistake.

Proxy, cluster or something else? (no replies)

$
0
0
I have a question regarding mysql servers setup. Hope some of you can give me some insight. Thank you so much in advance! Here is my question:

I have two MySQL servers: A & B (A and B can be two groups of servers, for simplicity, let's just say "A" and "B" are single servers).

At any time, only A or B is accessible by clients. For instance, A is running and accessible by clients through a proxy/cluster. Then at a prescheduled time during the day, B will be updating itself from a 3rd party data provider. Once B completes the updating, it will plug itself back into the proxy/cluster and accessible by clients and A will unplug itself from the proxy/cluster. Then next day, A and B will be doing the exact same thing again, meaning A will update itself, plug itself back into the proxy/cluster once the updating is done and B will unplug itself.

What is the best way to achieve what I want to do above? I look through the Proxy documentation, I can't see anyway that I can dynamically plug and unplug MySQL servers. Cluster doesn't allow it either. I can write a script to achieve it, but I would like to see if I can use any existing MySQl features/tools that can fulfill my need.

Thanks a lot!

Best Regards,
Vince

DB session cache (no replies)

$
0
0
Hi,

Is there a DB session cache with mysql?

Please tell me!!!

Thnaks

mysql-proxy strange with default_db (no replies)

$
0
0
Hello, i test with such code
function read_query(packet)
local fl = io.open('/tmp/qlog',"a")
fl:write("QUERY: "..packet:sub(2).."\n")
fl:write("DB: "..proxy.connection.client.default_db.."\n")
fl:flush()
fl:close()
end

when connected via console

root@sql-crm:~# mysql -h 127.0.0.1 -P 3307
......
......
mysql> USE `test`
.....
Database changed
mysql>



and get in log

QUERY: select @@version_comment limit 1
DB:
QUERY: SELECT DATABASE()
DB:
QUERY: test
DB:
QUERY: show databases
DB: test
QUERY: show tables
DB: test
QUERY: Comment
DB: test
QUERY: User
DB: test
QUERY: client_landing
DB: test
QUERY: q
DB: test
QUERY: t1
DB: test






when connecting via IDE (mysql workbench for example) and select DB test
i see in log


QUERY: set autocommit=1
DB:
QUERY: SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'lower_case_table_names'
DB:
QUERY: SELECT current_user()
DB:
QUERY: SET CHARACTER SET utf8
DB:
QUERY: SET NAMES utf8
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'sql_mode'
DB:
QUERY: SELECT CONNECTION_ID()
DB:
QUERY: SHOW SESSION STATUS LIKE 'Ssl_cipher'
DB:
QUERY: USE `test1`
DB:
QUERY: set autocommit=1
DB:
QUERY: set autocommit=1
DB:
QUERY: SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'lower_case_table_names'
DB:
QUERY: SELECT current_user()
DB:
QUERY: SET CHARACTER SET utf8
DB:
QUERY: SET NAMES utf8
DB:
QUERY: SELECT CONNECTION_ID()
DB:
QUERY: SHOW SESSION STATUS LIKE 'Ssl_cipher'
DB:
QUERY: USE `test1`
DB:
QUERY: set autocommit=1
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'sql_mode'
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'version_comment'
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'version'
DB:
QUERY: SELECT current_user()
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'lower_case_table_names'
DB:
QUERY: SHOW DATABASES
DB:
QUERY: SHOW DATABASES
DB:
QUERY: SHOW SESSION VARIABLES LIKE 'version_compile_os'
DB:
QUERY: SHOW GLOBAL VARIABLES
DB:
QUERY: SHOW ENGINES
DB:
QUERY: SHOW FULL TABLES FROM `test1`
DB:
QUERY: SELECT name, type FROM mysql.proc WHERE Db='test1'
DB:
QUERY: SHOW COLUMNS FROM `test1`.`t1`
DB:




DB:
QUERY: USE `test1`
DB:

Why mysql-proxy do not detect change default db ?

trying to start mysql router (no replies)

$
0
0
I am trying to start the mysql router with mysqlrouter -config=/opt/app/mysql/product/7.4.12/etc/mysqlrouter/mysqlrouter.ini and I am getting the following error:

./mysqlrouter: error while loading shared libraries: libmysqlrouter.so.1: cannot open shared object file: No such file or directory

any ideas?

John Jones

MySQL Proxy - infinite waiting (no replies)

$
0
0
Hello,
I recently started working with mysql-proxy and has gone through many articles but still not successful to run it.

I have downloaded the file and extracted it and then run it with writing in a terminal the following:

$mysql-proxy --proxy-backend-addresses=localhost:3306 proxy-address=127.0.0.1:4040

it starts running ...

but when I open another terminal and write

$mysql -u root -ppassword -h 127.0.0.1 -P 4040

nothings happens in both terminal and it simply goes infinite waiting

I also raised a question in stackoverflow and attached a picture in there

http://stackoverflow.com/questions/40334013/mysql-proxy-does-not-return-any-result-nor-the-proxy-can-read-the-query

please help me resolve this

Thank you

Proxy Wars: comparing ProxySQL to others (no replies)

When can the mysqlrouter support fabric sharding ? (no replies)

$
0
0
When can mysqlrouter support fabric sharding ?

Group Replication and MySQL Router (no replies)

$
0
0
Hi,

Is there any example of how to configure MySQL Router with Group
Replication? I've configured the Group Replication on the server side, but
I can't find any doc/examples for the Router.

Thanks.

MySQL Group Replication: native support in ProxySQL (no replies)

Router writing to multiple servers.. (no replies)

$
0
0
Hi There,

I'm a little new to Mysql so I'm not 100% sure whether I'm going at this in the correct way.

Ok , so I basically need to have a primary and secondary Mysql server where the secondary will only come into play when the primary is down.

My first thoughts were to use MySql replication to ensure that the servers are identical copies of each other but then I realized that my records won't be replicated back to the master when I write to the slave if the master goes down.

Is it possible to get mysql router to write to multiple servers ? It seems currently it's only writing to the first available server... If the first server goes down , it does connect to the secondary server but anything I write to either server doesn't seem to get replicated across.

So in short , is there a way of ensuring that both servers are in sync no matter which one I write to ? Almost like master to master replication ?

My config is rather basic.

[routing:read_write]
bind_address = 10.25.0.200
bind_port = 7002
destinations = localhost:3306,10.25.0.201:3306
mode = read-write

thanks in advance,
-steph

MySQL Router: how to log syntax errors? (no replies)

$
0
0
I have just installed MySQL Router and I have started it like this:

sudo mysqlrouter -c /etc/mysqlrouter/mysqlrouter.conf

After that I have run tail -f /var/log/mysqlrouter/mysqlrouter.log, and make some syntax mistakes on my queries but the log is not writing anything about those mistakes. So how can I see syntax errors about my queries using MySQL Router if it is possible?

I'm on Ubuntu.

mysql router ssl support (1 reply)

$
0
0
Hello ,

I am working on setting up innodb cluster as part of it trying to bootstrap mysqlrouter with ssl option and it throw below error however document says ssl options are supported.Any insights will be helpful and confirmation on ssl support is much appreciated.

https://dev.mysql.com/doc/mysql-router/2.1/en/mysql-router-command-options.html

mysqlrouter -v
MySQL Router v2.1.3 on Linux (64-bit) (GPL community edition)

bootstrap error

mysqlrouter --bootstrap xxxx:3306 --ssl-ca mysql-stage.pem --directory /home/xxxx/myrouter --conf-use-sockets

Configuration error: Certificate Verification is disabled in this build of the MySQL Router.
The following parameters are not supported:
--ssl-mode=VERIFY_CA, --ssl-mode=VERIFY_IDENTITY,
--ssl-ca, --ssl-capath, --ssl-crl, --ssl-crlpath
Please check documentation for the details.

Thanks!!

Is Router suitable for simple proxy (no replies)

$
0
0
I'm looking for a simple proxy which will allow me to route DB requests to a single database instance. MySQL-proxy came up as an option, but I have read that it is deprecated. Is MySQL Router a direct replacement? We intend to use MySQL Enterprise Edition.

ProxySQL and MySQL 8.0.2 (no replies)

Mysql Router and cached writes (1 reply)

$
0
0
I'm trying to cut through the documentation to figure out if writes can be cached, or rather latency from a remote write can be hidden.

I have realtime asterisk setup and it really doesn't work well if the database takes longer than say 50ms to reply to it's basic updates to call flow. I want to have the master database remote with a local slave. asterisk would read from the slave and write to remote master.

Can Mysql Router reply to asterisk immediately that it got the write and let asterisk move on? As in, will it act more like a mysql agent rather than a traditional proxy.

Alternatively, is there another method to handle this that doesn't require a local master? I could possibly do a master<>master w/ multi-source to produce a star topology replication (there are more than 2 sites) but that is very complex and could cause the entire system to go down from a replication error. A Master<>Slave topology works much much better if I could just solve the remote write latency.

Thanks!

mysql-router replication-manager integration (no replies)

$
0
0
Hi,

I'de like to enable micro service deployment of mysql-router via replication-manager

Using group replication looks straight but for more classic setup like multi-master or master-slaves, can mysql-router request the nodes role via uri call or external scripts ?

It seems that it used to be possible calling some fabric URI but looks deprecated now and very undocumented!

Is such feature forever gone?

haproxy or nginx can use external script called for each backend in a service, a custom script with list of arguments and expecting succeed or failed

Can such generic plugin be back in the roadmap of mysql-router?

/Svar
Viewing all 344 articles
Browse latest View live