post Category: Uncategorized post Comments (0) postApril 4, 2010

How To Login to MySql

  • mysql -uuser -ppassoword
  • Example mysql -uroot -pthisismypassword
  • mysql –user=user –password=password
  • Example mysql –user=root –password=thisismypassword

How to List databases in MySql

  • at mysql command prompt> show databases;
  • Ex:  mysql> show databases;

Select a database in MySql

  • at mysql prompt> use databasename;
  • Ex:  mysql> use my_db;

Select list of tables in MySql

  • at mysql prompt> show tables;
  • Ex:  mysql> show tables;

List columns in MySql table

  • at mysql prompt> show columns from tablename;
  • Ex: mysql> show columns from my_table;

Sorry, no comments yet.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.