title: DBeaver export to csv: "No database selected"
body: <pre><code>select * from users u
  where u.id &lt; 1000
  </code></pre>
  <p>When I right-click to script, and export I get <strong>no database selected</strong> error.</p>
  <p>When I add &quot;<strong>use db</strong>&quot; command at above,I get a syntax error.</p>
  <pre><code>use db
  select * from users u
  where u.id &lt; 1000
  </code></pre>
  <blockquote>
  <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM..'</p>
  </blockquote>
  <p>How do I export in DBeaver?
  I use a MacOS, and db is using MariaDB if that matters.</p>