Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2011

    Unanswered: get data from one databse of other website from current web site web site

    I have details stored in a database of a web site

    I have created another web site

    I want to use data from database of

    Is this possible ...

    Assume : I have all user id and password for both these databases

    If YES, how to do this

    Please help

  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    Yes it is possible. MySQL is client/server based. When you connect you are prompted for a host, a username, a password and a port number. The port number by default for MySQL is 3306.

    If you are using PHP for your application you would use the following function

    $dbh = mysql_connect("", "username", "password");
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    log on to first database

    run mysqldump to dump the data to an sql file

    log on to second database

    run sql file

    vwalah!! | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts