$su $/etc/init.d/mysqld start Starting MySQL: [ OK ]
$ mysql -u root -p password : Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
if root haven't password remove -p
mysql> show databases; +----------+ | Database | +---------- + | drupal | | mysql | | test | | tmp | +----------+ *mysql>
mysql> use mysql; Reading table information for completion of table and column names Database changed mysql>
mysql>show tables; +-----------------+ | Tables_in_mysql | +-----------------+ | columns_priv | | db | | func | | host | | tables_priv | | user | +-----------------+ 6 rows in set (0.00 sec) mysql>
mysql> create database hazem; Query OK, 1 row affected (0.16 sec) mysql>
mysql> create table Friends(id integer , name char(20)); Query OK, 0 rows affected (0.01 sec) mysql>
mysql> insert into Friends values(1,'alaa'); Query OK, 1 row affected (0.00 sec) mysql>
mysql> select * from Friends; +------+-----------+ | id | name | +------+-----------+ | 1 | alaa | | 2 | manal | | 3 | MSameer | | 3 | OneOfOne | | 3 | BlueViper | | 3 | Yousef | +------+-----------+ 6 rows in set (0.07 sec) mysql>
mysql> drop tablen Friends; Query OK, 0 rows affected (0.05 sec) mysql>
mysql> drop database mysql; mysql>
mysql>\q Bye $