Difference between revisions of "SSH MySQL"

From KOP KB
Jump to: navigation, search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
If you can SSH into a database you will use putty to start a session and then login as follows:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
login as: dbusername
 
login as: dbusername
Line 10: Line 11:
  
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
</syntaxhighlight>
+
</syntaxhighlight><br>
 +
 
 +
After logging in you can connect to the information schema table and find out exactly how much each table is taking up in MB.<br>
 +
https://knightsofprocrastination.ca/MTS/sshmysqlcommands.jpg<br><br>
 +
You should get a result similar to this:<br>
 +
https://knightsofprocrastination.ca/MTS/sshmysqltable.jpg<br><br>
 +
Below you can copy and paste the code into putty, paste is right click on the mouse.<br>
 +
<html>
 +
<iframe src="dbtablesize.html">
 +
</iframe>
 +
</html>

Latest revision as of 22:57, 10 December 2015

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.
sshmysqlcommands.jpg

You should get a result similar to this:
sshmysqltable.jpg

Below you can copy and paste the code into putty, paste is right click on the mouse.