Feeds:
Posts
Comments

Archive for December, 2008

Running mysql queries in command line is possible with a option
to execute the SQL statement and quit.
Follow the syntax below :
mysql -u user -p -e ‘SQL Query’ Database_Name
Where,
-u : Specify mysql database user name
-p : Prompt for password
-e : Execute sql query
SQL Query : Specify your SQL query
Database_Name : Specify database name
eg :
verman@desktop:~$ mysql -u [...]

Read Full Post »

Basic MySQL Commands for Begineers

1. How to login mysql from GNU/Linux shell ?
$mysql -h hostname -u root -p
2. How to create a database ?
mysql> create database [Database_Name];
3. How to list all databases ?
mysql> show databases;
4. How to list all the tables in a database ?
mysql> show tables;
5. How to switch to a database ?
mysql> use [Database_Name];
6. How to list [...]

Read Full Post »