title: Escaping String literals in REGEXP with MySQL
body: <p>Have a tricky problem down here. </p>
  
  <p>Lets say I have table 'books', which has column 'title'. And I have one row with 'title' = 'MyBook'.</p>
  
  <p>I want using REGEXP search for book title and I want to quote all searchable string to literal sequence:</p>
  
  <pre><code>SELECT * FROM books WHERE title REGEXP '\\QMyBook\\E';
  </code></pre>
  
  <p>When I work with mariaDB my query works fine. DB recognises this quotation marks. But when I work with plain MySql this query returns nothing. The problem is not in backslashes, I think MySql have troubles to work with "\Q" and "\E". Maybe there is a way to do my goal in other way, but I realy don't want to escape every character separately.</p>
  
  <p>I execute this query from java. But plain query from console works the same way</p>
  
  <p>The problem is - it is really necessary to use REGEXP (not LIKE) operator because of some reasons.</p>
  
  <p>But I don't want that query with regexp special characters (for example 'My.ook') work here. I need that any string, with or without regexp special symbols, processed by mysql as literal sequence(if we pass 'dot' - we are looking for 'dot', not for 'any character')</p>