Getting a txt sql Doc into mySQL without PHP admin

Discussion in 'MySQL' started by comusher, Jun 13, 2008.

  1. #1
    I know this probably has an obvious answer, but I am not a db expert.

    Say I have the db name, db username, db pass, and know it is on "localhost" & I have a sql txt doc how can I get it into a mySQL db if I do not have a php myadmin to access?

    Is there a script I can get from somewhere in php that I can input the login info and the query (without needing a lot of programming skills), upload to the server, then execute from my browser and it will put the data into the db?

    Thanks for the help in advance!
     
    comusher, Jun 13, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Try using a manager like Navicat: http://www.navicat.com/

    As long as you have the correct permissions, you can use it to manage a database, and it is much better than phpmyadmin. They have a free trial and a free personal version.
     
    jestep, Jun 13, 2008 IP
  3. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #3
    Comusher,

    Is the MySQL database hosted? If so, your host should have a MySQL manager available. Worst case, you can write a small PHP script to connect to the database, insert the data, and close connections. There are tons of examples on the web to do the above ... and I can assist if needed.

    Good luck.

    Social.Network
     
    Social.Network, Jun 15, 2008 IP
  4. comusher

    comusher Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the tips! I will try the Navicat and if that does not work I will try my hand at writing a script.
     
    comusher, Jun 20, 2008 IP
  5. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #5
    You can also use MySQL GUI tools such as MYSQL Administrator and MYSQL Query Browser. These applications are developed by MYSQL itself.
     
    MayurGondaliya, Jun 20, 2008 IP
  6. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #6
    You can also use Shell/SSH's command SQL dump.
    You probably don't know SSH so it may be hard but it is pretty easy...you'll need software for your PC to connect called Putty. You upload file on your server and just dump it directly into your db from there using a shell command. Search google for it..

    Or you can use a php script:
    http://www.ozerov.de/bigdump.php

    This may be easiest option for ya. It's a script that will run from front-end. It's not a control panel add-on or server application.
     
    EGS, Jun 20, 2008 IP
  7. advancedfuture

    advancedfuture Banned

    Messages:
    481
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #7
    if you have console access you can just issue the following command

    mysql --username=yourusername --password=yourpassword -D yourdatabasename > importfile.sql
     
    advancedfuture, Jun 24, 2008 IP