Home >> FAQs/Tutorials >> MySQL Tutorials
MySQL Tutorial - Use "mysql" to Run SQL Statements
(Continued from previous topic...)
How To Use "mysql" to Run SQL Statements?
If you want to run SQL statement to your server with "mysql", you need to
start "mysql" and enter your SQL statement at the "mysql" prompt.
Here is a good tutorial exercise that shows you how to run two SQL statements with "mysql":
>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.fyicenter.com');
Query OK, 1 row affected (0.02 sec)
(Continued on next topic...)
- What Tools Available for Managing MySQL Server?
- What Is "mysqld"?
- What Is "mysqladmin"?
- How To Check Server Status with "mysqladmin"?
- How To Shut Down the Server with "mysqladmin"?
- What Is "mysql"?
- How To Use "mysql" to Run SQL Statements?
- How To Show All Tables with "mysql"?
- What Is "mysqlcheck"?
- How To Analyze Tables with "mysqlcheck"?
- What Is "mysqlshow"?
- How To Show Table Names with "mysqlshow"?
- What Is "mysqldump"?
- How To Dump a Table to a File with "mysqldump"?
- What Is "mysqlimport"?
- How To Load Data Files into Tables with "mysqlimport"?