1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can you access your mySQL databases from an FTP?

Discussion in 'PHP' started by boyponga, Feb 23, 2007.

  1. #1
    Im just wondering, how can you put your databases in an FTP server and how can you access it via FTP using PHP? For example, I would put xampp in FTP, how can you access the database within xampp?
    SEMrush
     
    boyponga, Feb 23, 2007 IP
    SEMrush
  2. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You Cant Acces SQL via ftp

    you need ssh access for that
     
    koolasia, Feb 23, 2007 IP
  3. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What on earth are you trying to do?
     
    Icheb, Feb 23, 2007 IP
  4. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the advice. :)

    Hope you read the question, I would like to access mySQL database from my FTP so that I can access my databases even my PC is off
     
    boyponga, Feb 26, 2007 IP
  5. designcode

    designcode Well-Known Member

    Messages:
    738
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    118
    #5
    MySQL is not a file that you can put on your FTP. It is itself a server. You can access mysql using any client.
     
    designcode, Feb 26, 2007 IP
  6. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, of course I didn't read the question. I have a habit of replying to threads without reading a single post.

    What you are trying to do is ridiculous, THAT'S why I asked. :rolleyes:
     
    Icheb, Feb 26, 2007 IP
  7. hape

    hape Peon

    Messages:
    108
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If access of mySQL is possible via FTP, I would not want to host anything on that machine

    FTP access could be created but better use a tool like phpMyAdmin to access the DB
     
    hape, Feb 27, 2007 IP
  8. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Not really ridiculous, I'm just wondering that if there is a way on having a database on your FTP for you to access your database without leaving your PC open for 24 hours.
     
    boyponga, Feb 27, 2007 IP
  9. designcode

    designcode Well-Known Member

    Messages:
    738
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    118
    #9
    I am yet unable to understand what do you mean when you say "access your database without leaving your PC open for 24 hours"? You are running your PC as MySQL server for your websites?
     
    designcode, Feb 27, 2007 IP
  10. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #10
    For the love of God you CAN'T access your MySQL database via FTP. It's RIDICULOUS.
     
    Icheb, Feb 27, 2007 IP
  11. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Let's put it this way, some says that it is not possible to get data in mySQL if it is placed in FTP, right?

    Meaning, you need your mySQL server in your PC directory. If you want your databases accessed in 24 hours, you must open your PC for 24 hours straight, or also use an SSH access thing.

    Anyways, any ideas on how you can access your databases in your mySQL using a PHP code?
     
    boyponga, Feb 27, 2007 IP
  12. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Boy you so aren't making any sense. Maybe you should learn some basics about PCs and the English language first before you come back and post here.
     
    Icheb, Feb 27, 2007 IP
  13. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Oh my god... OK, I think what you're asking is 'how can I have a remote MySQL server'?

    It has nothing to do with FTP: just set MySQL server up on a remote machine that is going to be on 24 hours (I assume the same machine that you are talking about FTP with) and then there, you're done.

    Make MySQL accessible from wherever it needs to be and you're sweet.

    Having said all that and with no offense intended, I think that you are so confused by the different types of technologies that you need to understand THEM before you can understand what we're trying to tell you...
     
    TwistMyArm, Feb 27, 2007 IP
  14. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I'm asking properly here, if you can't answer my question just stop posting nonsense posts.

    I am asking for how can you access the data from mySQL, not mySQL itself
     
    boyponga, Mar 1, 2007 IP
  15. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #15
    If you have direct access to where your mysql is installed you can see mysql files. But they are useless if you don't "read" them with mysql.

    Please note the "".
    For example you can take those files and put in another computer with mysql installed. but this is risky, I'm not sure it works.Better to have a mysqldump.

    Regarding your question..well..it's not that clear. If you want that your application uses data of your mysql server, you need to have a mysql server somewhere that manage those datas. If for some reason you have to switch off your mysql from your PC, just create a dump of it first. Then put the dump on a ftp server. When some other application want to read datas from your mysql, they just take the dump and:
    1st possibility: parse the whole file
    2nd possibility: load that file in another mysql server to be read.

    If you want more help you should make an example (like computer A has mysql, computer B has ...)
     
    ma0, Mar 1, 2007 IP
  16. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Thank you all for your advices. :)

    Got it, thanks for the advice. :)
     
    boyponga, Mar 1, 2007 IP
  17. Yeldarb

    Yeldarb Active Member

    Messages:
    209
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #17
    Upload a .php file that does what you want with mysql and outputs it to a text file. Have a cron job execute the script once per minute.

    This is not the smartest thing to do... but hey whatever floats your boat ;)
     
    Yeldarb, Mar 1, 2007 IP
  18. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #18
    You can access MySQL binary files via FTP. As a matter of fact, you can access anything via FTP that is on your server. Your options are as follows:

    * Use SFTP to access your server via the root password.

    * If you are not the root, ask the administrator to "link" your database folders to your main ftp accounts, to which you can access.

    Both are secure and easy for database backup (just insure that MySQL service is stopped while doing so, otherwise it will render the files in-use or corrupt).

    Accessing the actual data on FTP like PHPMyAdmin is also possible, but you need someone to actually create such script to transfer MySQL to files type database (which destroys the sole purpose of MySQL).

    Peace,
     
    Barti1987, Mar 1, 2007 IP
  19. UmairQadri

    UmairQadri Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Hi,

    My website is still live and I have got the FTP access of it as well. I dont have any access to Cpanel or PhpMyAdmin to export the database.

    I have decided to move the website to a reliable host who will be able to provide me all this , but I don't want to lose my website.

    I know the user name and password for the database which is stored in one the DB connection files.

    is there any way for me to export the database using the current resources and move my website to any other server.

    Any help will be much appreciated.
     
    UmairQadri, Dec 13, 2012 IP
  20. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #20
    Not unless you have CPanel, shell or some other form of access that will let you run MySQL or a program that can access the data via MySQL. You don't have access to MySQL's files, not even the file that has your database in it. (They might not even be on the computer you have access to.)
     
    Rukbat, Dec 13, 2012 IP