[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] How to create a Mysql database within ssh



On Mon, 18 Mar 2002, Ian wrote:

> Hi one and all,
> 
> Can anyone tell me how I go about creating a new mysql tables etc from
> within SSH
> 


mysql -u username -p
Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 596 to server version: 3.23.37

Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql> 


Now create a db.

CREATE DATABASE whatever;


USE whatever;

create table my_table(col1 VARCHAR(25), col2 INTEGER);


mysql> show tables;
+-------------------+
| Tables_in_user    |
+-------------------+
| my_table          |
|                   |
+-------------------+
1 rows in set (0.00 sec)

mysql> 



/Richard

--
Ph.D. student
University of Trollhättan/Uddevalla
Dept. of Informatics and Mathematics
Phone(work):  +46 520 475324
Phone(mobile):+46 706 840845
Fax:          +46 520 475399