Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Member DanielGibbs's Avatar
    Join Date
    Jun 2004
    Location
    North Devon, England
    Posts
    63
    Member #
    6249
    Hi, I would like to know how to CREATE and EXPORT databases through shell access on telnet. Cheers

  2.  

  3. #2
    Member Victor's Avatar
    Join Date
    Jul 2004
    Posts
    54
    Member #
    6614
    Connect to mysql:
    shell> mysql -h host -u user -p
    Enter password: ********
    Viewing databases:
    mysql> SHOW DATABASES;
    Create database:
    mysql> CREATE DATABASE yourdbname;
    Select database:
    mysql> USE yourdbname
    Then do MSQL queries.

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    To export using mysql monitor (command line), use:
    Code:
    mysqldump -u username -ppassword database_name > filename.sql
    Note no space between -p and your password, and also no semicolon at the end.

    This will store a backup/copy of the specified database in the same folder mysql.exe resides in (normally the 'mysql/bin' folder). The backup in tis case, would be named 'filename.sql'.

    To import the database again, copy the 'filename.sql' from your local drive, and upload it to the server (to the same folder you'll be running this command:
    Code:
    mysql -u username -ppassword database_name < filename.sql
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:04 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com