Connect to MySQL Servers thru a Command Line Application

Viewing your databases in the Command Line

The MySQL command-line interface gives interactive feedback, and has a few very nice features.
Using the command-line tool can save a lot of time, especially for things that you won’t do very often.
It’s also a fantastic environment to test new queries for correctness.
Learning the command-line interface is not required, but it is often extremely helpful, and is highly recommended.

Download Putty very good light weight application for ssl into your site trhu the Command Line

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

What is PuTTY?

PuTTY is a client program for the SSH, Telnet and Rlogin network protocols.

These protocols are all used to run a remote session on a computer, over a network.
PuTTY implements the client end of that session: the end at which the session is displayed,
rather than the end at which it runs.

In really simple terms: you run PuTTY on a Windows machine, and tell it to connect to (for example) a Unix machine.
PuTTY opens a window. Then, anything you type into that window is sent straight to the Unix machine,
and everything the Unix machine sends back is displayed in the window. So you can work on the Unix machine as if you were sitting at its console, while actually sitting somewhere else. formore info refer Link Below

http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-what

Open Putty and Enter you login details such as User Name  and Password
If you Dont Know these then you Shouldnt Connect

What login name / password should I use?

This is not a question you should be asking Me!!.

PuTTY is a communications tool, for making connections to other computers.
I don’t administer any computers that you’re going to be able to use, Just like the folk  who make web browsers aren’t responsible for most of the content you can view in them.
I WILLnot help with questions of this sort.

If you know the name of the computer you want to connect to, but don’t know what login name or password to use,  you should talk to whoever administers that computer.

Putty Default Screen

Putty Default Screen

I actually set up a Saved Session for Each Site

HOST NAME (Or IP Address)  port Number Normally  port 22

freeblog.co.nz

Give the Session a Name the Website Name Is good

Hit the save Button

Hit the Load Button  below is what should Show

This a saved Putty session

This a saved Putty session

Add your Login and Password at the Prompts

and you should be Logged In

This is what your Command Line Interface should Look like

This is what your Command Line Interface should Look like

Now to see any Databases you have  to Login to the MySQL sERVER

This Should Do it

Username@website.com [~]# mysql -u username -ppassword;

This is your logged in command line interface

This is your logged in command line interface

Now we want to see the Databases so its simple in the command Line type this

Username@website.com [~]# mysql show databases;

Viewing your databases in the Command Line

Viewing your databases in the Command Line

So you want to Add a database now In the mysql program, issue this statement:

mysql> CREATE DATABASE Whatever;

To change a Database

In the mysql program, issue this statement:

mysql> use whatever;

Database changed

[usefull Mysql Tips http://billbailey.co.nz/MySQL_Useful_tips.php]

To Quit the MySQL Server

In the mysql program, issue this statement:

mysql> quit

Bye

Leave a Reply