Portal Home > Knowledgebase > Articles Database > SSH Commands: Common questions


SSH Commands: Common questions




Posted by Kotsolis, 02-04-2015, 11:12 PM
I have some questions about SSH commands so I will probably post them here. I have a Joomla site using mysql databases. 1)Which command would you prefer from those 3 to repair your mysql more safely? mysqlcheck --check --auto-repair --all-databases mysqlcheck -u root -p --auto-repair --all-databases mysqlcheck --all-databases --auto-repair --force (and if all of them are safe, then the most efficient). 2)Is this optimize command safe to write? Any chance of having any mysql database crashing or losing data? mysqlcheck --optimize --all-databases Thank you.

Posted by david_was_here, 02-04-2015, 11:42 PM
Off the top of my head I'm assuming the only one that *should* be valid is the second mysqlcheck command as you *should* have a root password set for MySQL's root user. That being said, you should not run it against all databases. On top of this, before even doing anything, you should dump each database so that if something were to go awry, you have a backup and can restore from it.

Posted by Srv24x7, 02-05-2015, 10:49 AM
Hi, Doing it on a complete databases at a single time may not be advised, as it may take too much time. It is advisable to have the DB checked before repairing it. mysqlcheck -c to check mysqlcheck -r to repair A proper DB backup has to be taken first before you do any sort of check on the DB.

Posted by Jenifer Ng, 02-05-2015, 11:30 PM
For some task like this it 's easy to use via an user interface like phpmyadmin to avoid the mistake

Posted by Kotsolis, 02-06-2015, 08:52 AM
Ok What about the optimization command. Is this command ok? mysqlcheck --optimize --all-databases

Posted by MilesWeb, 02-06-2015, 09:21 AM
Yes, that's the correct command. You can even use Is the same as you have mentioned.

Posted by Srv24x7, 02-06-2015, 09:51 AM
Hi, Yes, that will be okay. You can also use below 2 if you want. mysqlcheck -o OR mysqlcheck -o -A

Posted by Kotsolis, 02-06-2015, 11:27 PM
Ok I've optomized MySQL but I got this message in half of the MySQL tables http://oi62.tinypic.com/21dl6zc.jpg What is that mean?

Posted by anuja9991, 02-06-2015, 11:33 PM
When you run OPTIMIZE TABLE against InnoDB tables it outputs the Table does not support optimize, doing recreate + analyze instead message. There is different method to optimize innodb tables.

Posted by Kloudy Day, 02-07-2015, 01:02 AM
These are not "SSH" commands. Anyway, get a backup first and don't use the flag `--force`, use force only and only when you know what you're doing or you've been told by the software provider to do it. I never had any problem with these two: mysqlcheck --check --auto-repair --all-databases mysqlcheck --optimize --all-databases

Posted by Kotsolis, 02-08-2015, 10:06 PM
Ok Thank you. Can someone also help me here? http://www.webhostingtalk.com/showth...63#post9365763 I have a very serious issue!! Thank you.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.