Executing commands on MySql commandline interface

We need to start “mysql” and enter the SQL statement at the “mysql” prompt.

 
>cd \mysql\bin
>mysql -u root test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.24
 
mysql> CREATE TABLE links (name VARCHAR(80));
Query OK, 0 rows affected (0.10 sec)
 
mysql> INSERT INTO links VALUES ('dba.w3mentor.com');
Query OK, 1 row affected (0.02 sec)
 
mysql> quit;
Bye
Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

 

 
eXTReMe Tracker