[MXS-4527] Schemarouter reports "non-existent database" Created: 2023-02-23 Updated: 2023-06-30 Resolved: 2023-06-30 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | schemarouter |
| Affects Version/s: | 22.08.4 |
| Fix Version/s: | 23.08.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Bruno | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian 11/docker |
||
| Sprint: | MXS-SPRINT-185 |
| Description |
|
I have two servers and one schemarouter service binded (+ listener and monitors).
So it performs shard map, can see that the requested DB exists, then it reports that database does not exist and refuse the connection The settings seems working well, but it cannot process the request. Any idea? |
| Comments |
| Comment by Bruno [ 2023-02-28 ] |
|
I performed many other tests. What I noticed is that the problem is when connection is started from a Drupal or a Concrete5 Website. If it is started from a Wordpress (same server), it works, and also if client is HeidiSQL. I tried to force case insensitive in MaxScale (MariaDB is on Windows) but still nothing. |
| Comment by markus makela [ 2023-02-28 ] |
|
So the problem is with the database names? The schemarouter should already treat table names case-insensitively:
|
| Comment by Bruno [ 2023-02-28 ] |
|
I cannot find where the problem is, but sure it always reports that the database does not exist (reporting in error message, as database name, exactly the value used by client, and that it's right, and always all lowercase). A full "case insensitive" environment is what my clients are expecting, because they are used to connect directly to a MariaDB running on Win. |
| Comment by Bruno [ 2023-03-09 ] |
|
I moved some databases from MariaDB on Win to MariaDB on docker (debian). The problem is the same:
user and database are defined only on one server behind schemarouter |
| Comment by Bruno [ 2023-03-09 ] |
|
I don't know if this can help, but if I execute show schemas like 'www.domain.com'; connected to mariaDB, it reports only one row [that's ok] Also, in the first result HeidiSQL colors row as green (that means "text"), on the seconds rows are gold (that means "other" data type). Other test using MaxScale GUI -> visualization:
So the problem starts in service schemarouter Also tried to create a new readconnroute + listener pointing to same server, and same database is accessible from visualization. |
| Comment by markus makela [ 2023-03-09 ] |
|
I think it might be a bug in how the default database case-sensitiveness is handled. |
| Comment by Bruno [ 2023-03-10 ] |
|
I noticed that WordPress, the only app working, starts PDO sessions with this code: $this->mysql = new so it assign as init command "SET NAMES utf8". I suspect that the problem is not case related (I have only database name in lower case), but encoding related, and WP is "fixing" it with a good coding practice. |
| Comment by Bruno [ 2023-03-10 ] |
|
I found that the problem is the ".", BOTH on database names and on users names. When a database or a login contains a ".", MaxScale return always "database unknown". |
| Comment by markus makela [ 2023-03-10 ] |
|
Ahh, it might be the . that is indeed the problem. |
| Comment by markus makela [ 2023-03-29 ] |
|
I think this might already be fixed in the upcoming 23.08 release. |
| Comment by markus makela [ 2023-06-29 ] |
|
This was partially fixed for 23.08 but required a minor fix to work correctly. |