MySQL Forums
Forum List  »  Newbie

Re: Create db
Posted by: Umesh Shastry
Date: June 09, 2005 03:41AM

Hi!!

Login to mysql...

C:\mysql\bin>mysql -uroot -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 53 to server version: 4.0.18-nt

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

(root@localhost) [(none)]> CREATE DATABASE UMESH;
Query OK, 1 row affected (0.00 sec)

(root@localhost) [(none)]> SHOW DATABASES;
+---------------+
| Database |
+---------------+
| ctrlappln |
| hareesh |
| umesh |
+---------------+
7 rows in set (0.00 sec)

(root@localhost) [(none)]>

YOU CAN ALSO CREATE DB USING MYSQLADMIN

http://dev.mysql.com/doc/mysql/en/mysqladmin.html

to restore the dump file try this..CD to mysql/bin


c:/mysql/bin>mysql db_name < /path-to-backup/backup-file.sql/backup-file.sql

Or like this:

c:/mysql/bin>mysql -e "source /path-to-backup/backup-file.sql" db_name


if above failes..(access denied etc then you must pass user name/password)
e.g

c:/mysql/bin>mysql -uusername -ppassword db_name < backup-file.sql

Regards,
Umesh Shastry
http://www.blogger.com/profile/02551756983528645221

Options: ReplyQuote


Subject
Written By
Posted
June 08, 2005 11:25PM
Re: Create db
June 09, 2005 03:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.