Difference between revisions of "SSH MySQL"

From KOP KB
Jump to: navigation, search
Line 17: Line 17:
 
You should get a result similar to this:<br>
 
You should get a result similar to this:<br>
 
<img src="http://knightsofprocrastination.ca/MTS/sshmysqltable.jpg" style="border:1px solid white"><br>
 
<img src="http://knightsofprocrastination.ca/MTS/sshmysqltable.jpg" style="border:1px solid white"><br>
Below you can copy and paste the code into putty, paste is right click on the mouse.
+
Below you can copy and paste the code into putty, paste is right click on the mouse.<br>
 
<html>
 
<html>
 
<iframe src="dbtablesize.html">
 
<iframe src="dbtablesize.html">
 
</iframe>
 
</iframe>
 
</html>
 
</html>

Revision as of 23:00, 14 November 2014

If you can SSH into a database you will use putty to start a session and then login as follows:

login as: dbusername
Using keyboard-interactive authentication.
Password:
Could not chdir to home directory /fullpathto/mysql/: Permission denied
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30355484
Server version: 5.0.91 Gentoo Linux mysql-5.0.91

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

After logging in you can connect to the information schema table and find out exactly how much each table is taking up in MB.
<img src="sshmysqlcommands.jpg" style="border:1px solid white">

You should get a result similar to this:
<img src="sshmysqltable.jpg" style="border:1px solid white">
Below you can copy and paste the code into putty, paste is right click on the mouse.