title: Can `mysqlcheck` help me resolve database problems without damaging my database?
body: <p><strong>Background</strong></p>
  
  <p>I have a Drupal site with a database that is managed with phpmyadmin. The database is over 1500 tables in size. I'm having huge issues with speed and was looking for a good fix. The database is 2.5-3 years old and has never been maintained (to the best of my knowledge).</p>
  
  <p><strong>Research</strong></p>
  
  <p>I've been trying to find a way to speed things up and everything leads me back to the pure size of the database. I came across the command</p>
  
  <pre><code>OPTIMIZE TABLE
  tbl_name [, tbl_name] ...
  </code></pre>
  
  <p>Witch soon lead me to the more powerful</p>
  
  <pre><code>mysqlcheck -o &lt;db_schema_name&gt;
  </code></pre>
  
  <p>I don't have a test area to use this command on as we only have one database. I know running this command will take a very long time on my database it could take days because of the sheer size of the database.</p>
  
  <p><strong>Reasoning</strong></p>
  
  <p>The reason I would like to use this is because it seems that MySQL shuts down or crashes every day or so. On phpmyadmin I see this </p>
  
  <p><img src="https://i.stack.imgur.com/Qr6eH.png" alt="phpmyadmin sql time up"></p>
  
  <p>It has only been up for 9hrs and I haven't switched it off since I started work on this 1 month ago. It seems to never get upto more than 15hrs.</p>
  
  <p><strong>Status Variables</strong></p>
  
  <p>This is the list of status variables that are showing values as alerts, I'm hoping to fix some of these with the mysqlcheck.</p>
  
  <p><img src="https://i.stack.imgur.com/Bb0wG.png" alt="alert values"></p>
  
  <p><strong>Conclution</strong></p>
  
  <p>I would like to know if running mysqlcheck on the database will cause any problems or damage any data in my database. It would also be handy to get an idea of how much time an operation like this will take.</p>