Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3292

Unable to execute use `database`

    XMLWordPrintable

    Details

      Description

      $dsn = "mysql:host=10.152.183.98;port=3306;dbname=test";
      $pdo = new PDO($dsn, $config['username'], $config['password']);
      $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      try {
          $res = $pdo->exec('use `test`');
      } catch (PDOException $e) {
          var_dump($e->getMessage());
      }
      
      

      When i execute "use `test`" with backtick i get following error
      SQLSTATE[HY000]: General error: 2003 Lost connection to backend server: connection closed by peer

      and in the MaxScale log receive this error

       error  : (30) [readwritesplit] (Splitter-Service) Lost connection to the master server, closing session. Lost connection to master server while connection was idle. Connection has been idle for 0 seconds. Error caused by: #HY000: Lost connection to backend server: connection closed by peer. Last close reason: <none>. Last error: 
      error  : (30) Invalid authentication message from backend 'dbsrv1'. Error code: 1049, Msg : #42000: Unknown database '`test`'
      

      It works If i connect directly to the MariaDB instance
      and it works without backticks regardless if I connect to through MaxScale or MariaDB

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markus makela markus makela
              Reporter:
              Micke Mikael Nilsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: