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

mysqlrouter is Unable to connect to the metadata server (no replies)

$
0
0
I have set up a set of three MySQL 8.0.17 databases using group replication. They are all on my Windows 10 PC, using ports 3306,3307,3308.

They were set up using the new 'clone' plugin.

I am now trying to set up mysqlrouter. I have installed it in c:/mysqlrouter/.

But when I run:

mysqlrouter --bootstrap root@localhost:3306 -d c:\mysqlrouter

I simply get:

Error: Unable to connect to the metadata server: Error connecting to MySQL server at 127.0.0.1:3306:
Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060 (2013)


This is the same on all three ports, and using each of the different users (localhost, 127.0.0.1 etc)

I have confirmed that the MySQL user exists on all of them, (I have root @ localhost / 127.0.0.1 / ::1 / % all set up) and I can login to MySQL using each of them.

Is there something I need to configure? I can't see anything obvious in the documentation?

MySQL Router 8.0.17’s REST API & MySQL Shell Extensions (no replies)

MySQL Router on Windows (no replies)

MySQL-Router 8.0.17 Linux integration and Group Replication metadata refresh (no replies)

How to integrate ProxySQL in MySQL InnoDB Cluster (no replies)

MySQL Router - After client machine rebooting, Cannot connect to MySQL InnoDB Cluster (3 replies)

$
0
0
Hello,

We are having trouble with MySQL Router on Ubuntu 18.04 LTS.

We installed MySQL Router (Version : 8.0.18-1ubuntu18.04) in client machine(OS: Ubuntu 18.04 LTS),
and we could access to MySQL InnoDB Cluster via Read/Write Connections port 6446.

But after rebooting client machine, we can not connect to Cluster via port 6446.
Router don't listen on this port.

We've done the following:

1. Install MySQL Router on client machine by apt command.

sudo apt install mysql-router

2. Bootstrap Router by following command.

sudo mysqlrouter --bootstrap root@172.18.0.31:3306 --user=mysqlrouter

3. Restart Router

sudo systemctl restart mysqlrouter

4. Confirm listening port.

sudo lsof -i -P -n | grep LISTEN|grep mysqlrouter
main 2354 mysqlrouter 4u IPv4 55249498 0t0 TCP *:6447 (LISTEN)
main 2354 mysqlrouter 5u IPv4 55247092 0t0 TCP *:6446 (LISTEN)
main 2354 mysqlrouter 6u IPv4 55225292 0t0 TCP *:64470 (LISTEN)
main 2354 mysqlrouter 7u IPv4 55244081 0t0 TCP *:64460 (LISTEN)

5. Access to Cluster (Success!).

mysql -uroot -p -h127.0.0.1 -P6447

6. Reboot client machine.

sudo reboot

7. After rebooting, confirm listening port.
But, client doesn't show ports mysqlrouter listens.

sudo lsof -i -P -n | grep LISTEN|grep mysqlrouter

8. Try to access to Cluster,but error occurs.

mysql -uroot -p -h127.0.0.1 -P6447
Enter password: XXXXXX
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

How can we solve this problem ?
Please give us some advice.

MySQL Router - We would like to remove a bootsrap setting. (2 replies)

$
0
0
Hello,

We are using MySQL Router (Version : 8.0.18-1ubuntu18.04) in client machine(IP: 172.18.0.31).
We are trying to access to MySQL InnoDB Cluster (Version : 8.0.18) via this Router.

Web did 2 bootstrap commands in client machine, as follows:

① sudo mysqlrouter --bootstrap root@172.18.0.31:3306 --user=mysqlrouter

② sudo mysqlrouter --bootstrap root@172.18.0.31:3306 --directory /etc/mysqlrouter --user=mysqlrouter

And then, we accessed to the Cluster as below:

shell > mysql -uroot -p -h127.0.0.1 -P6446 mysql_innodb_cluster_metadata
mysql> select * from routers;
+-----------+-------------+---------+------------+
| router_id | router_name | host_id | attributes |
+-----------+-------------+---------+------------+
| 2 | system | 9 | NULL | → Record 1
| 30 | | 9 | NULL | → Record 2
+-----------+-------------+---------+------------+
2 rows in set (0.00 sec)

In this routers table, Record 1 was inserted by ① command,and Record 2 was inserted by ② command.

We need not the bootstrap setting by ① command.
Please give us some advice how to remove this setting.
May we just delete Record 1 ?

> in client machine(IP: 172.18.0.31).

Sorry,this is not client machine's IP, it's Cluster server's.
※ December 05, 2019, modified.

MySQL Router bootstrap without interactive password prompt (no replies)

$
0
0
Hi,
I'm searching through all options and I cannot find using password in different way than interactive.

Is it possible to bootstrap configuration using specific user without providing manually password?

Thanks for any tips!

MySQL Connectors 8.0: support for DNS-SRV (no replies)

Connector/J DNS SRV with Consul (no replies)

MySQL Server Mock (no replies)

does mysql router support MyISAM engine database? (no replies)

$
0
0
hi, I am building a duel-master(both rw enabled) mysql databases, and the database schemes are created by someone else which are combined with some Myisam tables and some InnoDB tables. if i put a proxy server in front of them, i want to use mysql proxy, but in the download page, I saw the recommended tool is mysql router, but the manual says the router is for InnoDB Cluster, so ... if I lost some auto replication feathers, can I still use those Myisam and InnoDB mixed databases with the router? thanks!

HA Architecture with MySQL Router (no replies)

$
0
0
Hi all,

I am trying to configure a master-master replication environment with HA achieved through MySQL Router.

My main question is whether MySQL Router should be deployed on MySQL database servers or on application servers?

What are best practices for such HA architecture? Any documentation on that issue?

Wouldn't be wise for best performance to deploy two MySQL router servers in a failover configuration acting as as HA load balancer?

Please advice as I am newbie in MySQL...

Thanks a lot for your assistance.

Regards,


Vangelis

MySQL Router REST API (no replies)

Can 'mysql-proxy-0.8.5' be used for MySQL 8.0.23 ? (no replies)

$
0
0
Hello Sir/Madam:
Recently I download mysql-proxy-0.8.5-linux-glibc2.3-x86-64bit From web,and try to use it,My MySQL Server version is 8.0.23,when I use mysql-proxy ,Where are somgthing wrong.
I looking for help on the website,and I found out that other people is MySQL 5.x,So I really Want to Know if mysql-proxy-0.8.5 can't suit MySQL 8.0.23 ?
Thanks A lot.

Authentication failures via socket after primary change (1 reply)

$
0
0
Hello,

I would like to report a bug with MySQL router 8.0.25 and below. Steps to reproduce:

1. Set up MySQL cluster
2. Bootstrap MySQL router with --conf-use-sockets option
3. Configure mysql to use socket, example config:
[client]
socket=/home/mysqlrouter/data/mysql.sock
user=admin
password=SuperSecret
4. Restart current primary server
5. Use mysqlsh setPrimaryInstance() to make restarted server primary after it's back online
5. Run mysql

Expected behavior:
Connection is established as usual

Actual behavior:
ERROR 1045 (28000): Access denied for user 'admin'@'x.x.x.x' (using password: YES)

Additional info:
If connection changed from socket to TCP, connection works. It's even possible to use socket again after successful connection via TCP.

mysqlrouter connection error for 127.0.0.1 (no replies)

$
0
0
Hi Experts,

Basic Info:
MySQL Router v2.1.4 on Linux (64-bit) (Commercial)
MySQL Ver 14.14 Distrib 5.7.20, for Linux (x86_64)

I am new to MySQL and MySQL Router,

Recently our MySQL Router is experiencing an unusual connection problem on our MySQL Router:

[root@pas202]#cat /var/log/mysqlrouter/mysqlrouter.log
2021-10-11 15:26:43 INFO [7f4c7bfa7700] [routing:prodCluster_default_rw] 29 connection errors for 127.0.0.1 (max 100)
2021-10-11 15:36:54 INFO [7f4c80fb1700] [routing:prodCluster_default_rw] 30 connection errors for 127.0.0.1 (max 100)
2021-10-12 10:09:48 INFO [7f4cd17fa700] [routing:prodCluster_default_rw] 31 connection errors for 127.0.0.1 (max 100)
2021-10-12 10:19:57 INFO [7f4c6d78a700] [routing:prodCluster_default_rw] 32 connection errors for 127.0.0.1 (max 100)
2021-10-12 10:29:33 INFO [7f4c72f95700] [routing:prodCluster_default_rw] 33 connection errors for 127.0.0.1 (max 100)
(timestamp above is UTC +8)


I understand that there is a connection error from localhost and I usually clear the error via mysqlrouter restart. But the question is the culprit that is attempting the connection. Upon checking from the MySQL Router logs and matching the timestamp it seems this is the culprit:

[root@pmse01]# cat /var/log/mysqld.log
2021-10-11T05:13:09.524728Z 15758097 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-11T05:23:45.483704Z 15759262 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-11T07:16:36.878786Z 15771528 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-11T07:26:41.565336Z 15772637 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-11T07:36:52.445713Z 15773751 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-12T02:09:46.579821Z 15894247 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-12T02:19:55.397823Z 15895335 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
2021-10-12T02:29:31.611252Z 15896393 [Note] Access denied for user 'ROUTER'@'pas202.presto.local' (using password: YES)
(timestamp above is UTC)

I can confirm there is no user 'ROUTER' in the mysql.user.
The MySQL Router connecting to MySQL is using mysql_router9_kjc1lba6sqfb.

Has anyone encountered this phenomena before?

Regards,
Sam Tan

How to implement mysql consolidation strategy with multiple instances? (5 replies)

$
0
0
Here's the problem.
When my home setup started, it had several application each having it's own database. But as time goes on my needs grow and suddenly I find myself deploying dozens of sql servers. Now I want to consolidate: i.e. to move every database to a single database server to better manage backups and so on.
The consolidation strategy that I would want to implement is to deploy multiple mysql-server instances on a single server using virtualization technologies such as docker BECAUSE each database is different: e.g. one is psql GIS database. Another is mysql-5, another is mariadb10.4 and so on.
The problem is, to make it consistent I need to have one endpoint to connect to all those database instances. What approach should I use to accomplish the task.
The task is similar to reverse proxy in case of web servers.

Router COnfig (no replies)

$
0
0
How to add multiple bind address without using 0.0.0.0

[routing:1]
bind_address = ip address1
bind_port = 7001
destinations = foo.example.org:3306
routing_strategy = round-robin

[routing:2]
bind_address = ip address2
bind_port = 7002
destinations = foo.example.org:3306
routing_strategy = first-available

mysql stuck on socket write/read with mysqlrouter 8.0.29 if packet is big (no replies)

$
0
0
Hi, team
In setup one MySQL Innodb cluster as below
a. host-A
MySQL server 8.0.29 + MySQL rourter 8.0.29 + MySQL shell 8.0.29
b. host-B
MySQL server 8.0.29
c. host-C
MySQL server 8.0.29 + Application

Before running application, I connect to the MySQL Innodb cluster with mysqlrouter url (host-A :6446), everything looks ok. Create db/table and then insert one row, all mysql servers are sychonized.
However, everytime when inserting one big row, around 30M I guess, it always stuck on the socket write with the same thread stack as below, and it's reproducible.
Then I uninstalled mysqlrouter 8.0.29 and mysqlsh 8.0.29, and install both of them with 8.0.28, this issue gone. Reinstalled 8.0.29 back, this issue occurs again.



java.lang.Thread.State: RUNNABLE
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
- locked <0x00000000a4315ac8> (a java.io.BufferedOutputStream)
at com.mysql.cj.protocol.a.SimplePacketSender.send(SimplePacketSender.java:53)
at com.mysql.cj.protocol.a.TimeTrackingPacketSender.send(TimeTrackingPacketSender.java:50)
at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:558)
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:622)
at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:987)
at com.mysql.cj.NativeSession.execSQL(NativeSession.java:666)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:930)
- locked <0x00000000a4314a50> (a com.mysql.cj.jdbc.ConnectionImpl)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)
- locked <0x00000000a4314a50> (a com.mysql.cj.jdbc.ConnectionImpl)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at org.apache.jackrabbit.core.util.db.ConnectionHelper.execute(ConnectionHelper.java:441)
at org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyUpdate(ConnectionHelper.java:320)
at org.apache.jackrabbit.core.util.db.ConnectionHelper.access$3(ConnectionHelper.java:314)
at org.apache.jackrabbit.core.util.db.ConnectionHelper$2.call(ConnectionHelper.java:308)
at org.apache.jackrabbit.core.util.db.ConnectionHelper$2.call(ConnectionHelper.java:1)
at org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:454)
at org.apache.jackrabbit.core.util.db.ConnectionHelper.update(ConnectionHelper.java:311)
at org.apache.jackrabbit.core.util.db.MySqlConnectionHelper.update(MySqlConnectionHelper.java:165)
at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1087)
- locked <0x00000000a43d6950> (a org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager)
at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:684)
at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.storeInternal(AbstractBundlePersistenceManager.java:626)
at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:503)
- locked <0x00000000a43d6950> (a org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager)
at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:480)
- locked <0x00000000a43d6950> (a org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager)
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:757)
at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:181)
at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:209)
- locked <0x00000000fc6ac578> (a org.apache.jackrabbit.core.TransactionContext)
at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:331)
at org.apache.jackrabbit.jca.JCASessionHandle.commit(JCASessionHandle.java:414)
at org.apache.jackrabbit.jca.JCALocalTransaction.commit(JCALocalTransaction.java:84)
Viewing all 344 articles
Browse latest View live