code to get a sql file to run in DB...

7 replies
Can someone PLEASE tell me the code I need to input to make a sql file run? I am trying to install a script and it tells me to import the sql into the database, which will then create the tables. So, I did but nothing happened. How do I force it to run? Thanks in advance as I'm going crazy!
#code #file #run #sql
  • Profile picture of the author Jay Moreno
    Hi Webgrannee

    In order to import an SQL file normally you would need to do the following steps:

    1) Access PhpMyAdmin - this is usually an online application that is provided by your host. Login into your web hosting control panel and see if you have a link to it. If not your host should be able to install a copy of it for you or tell you how to access it.

    2) After logging into PhpMyAdmin you should see a list of your databases - select the database you want to work with and PhpMyAdmin will load the data up so as you can start to access/modify it.

    3) Along the top of screen you should now see menu tags, one of these tabs will read "Import" - select this tab. On this page you should now see a browse button. Click this and then select your SQL file you want to import. Now hit GO.

    This should/will import your SQL data into the correct tables.

    If you have already done this sequence of steps and the script is still not working - let me know as its possible there is something wrong with your configuration.

    Also if you can let me know what script it is your using it would also be helpful.

    Hope that helps.

    Jay aka ukescuba
    Signature
    Sorry, I am too busy helping people to think of a cool signature!
    {{ DiscussionBoard.errors[560992].message }}
  • Profile picture of the author webgrannee
    Hi Jay,

    The script is plx Autoresponder and I'm having to host it on on host4profit, so, no direct access to PhpMyAdmin (that I see, anyway). And it appears to import, but, doesn't show any file in DB, and I know I've forced another script to run before, but, on another host that gives me direct access to PhpMyAdmin. Just can't remember how or what to enter before the file name.
    {{ DiscussionBoard.errors[561008].message }}
  • Profile picture of the author Jay Moreno
    hi webgrannee

    how are you trying to import the sql file? through the script itself - unfortunately im unfamiliar with autoresponder but am sure i can figure out the problem.

    Is your configuration file properly setup for the script?

    thanks

    Jay
    Signature
    Sorry, I am too busy helping people to think of a cool signature!
    {{ DiscussionBoard.errors[561047].message }}
  • Profile picture of the author webgrannee
    Jay,

    I have NO idea what you just said lol. I'm going into my database through cpanel (or whatever they call it). Then, click on the database to see that. I have the autoscript (sql) that is supposed to run and create all my tables for that database. The only option for importing into PhpMyAdmin is a sql button, which pops up a window, then can select import. Which I did. Window seemed to refresh, but, still no tables showing in that database. I do know (about only thing), is that I can directly force that file to run while in the database, such as run> xxxx.sql I just don't know the proper syntax. Sorry, I know my tech speak is horrible, so, probably not saying this right.

    Brenda
    {{ DiscussionBoard.errors[561073].message }}
  • Profile picture of the author Jay Moreno
    you can always open the sql file with notepad then copy the code and paste it into your sql tab in phpmyadmin and execute it from there...

    unfortunately its hard to see whats happening without being hands on...

    let me know if this helps...
    Signature
    Sorry, I am too busy helping people to think of a cool signature!
    {{ DiscussionBoard.errors[561214].message }}
  • Profile picture of the author webgrannee
    HOT xxxx! It worked!! Sorry, just so happy I could explode and would hug you if I could! Thank you, thank you, thank you!

    I feel so dumb, but, scripts, coding....are beyond me (in case that's not painfully obvious now lol).

    God Bless and thank you again, SO very much!
    Brenda
    {{ DiscussionBoard.errors[561272].message }}
  • Profile picture of the author Jay Moreno


    no problem at all - its a pleasure to help!

    ive been in your shoes many many times over and unfortunately didnt have the resources available to help me so have had to figure a lot of stuff out myself...

    any other questions dont hesitate to ask

    thanks

    jay
    Signature
    Sorry, I am too busy helping people to think of a cool signature!
    {{ DiscussionBoard.errors[561294].message }}

Trending Topics