#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    I'm trying to write a small forum script
    How do I creat mysql tables on a remotely hosted server? does the administrator have to do this? or is it done in a php script?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    St.Paul, MN, USA
    Posts
    2
    Rep Power
    0
    To administer mysql I use telnet (or TerraTerm) to get to the Linux command line
    and then type mysql <name of your database>
    that brings me to the command line interface
    where I can issue commands to mysql.

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by carp:
    I'm trying to write a small forum script
    How do I creat mysql tables on a remotely hosted server? does the administrator have to do this? or is it done in a php script?
    [/quote]

  4. #3
  5. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    You can also do it through PHP. Like this:

    <?

    mysql_connect(localhost, user, pass);
    @mysql_select_db(your_db);

    $query = "
    CREATE TABLE news (
    date VARCHAR(22),
    title VARCHAR(100),
    body TEXT
    id INT
    )
    ";

    $result = mysql_query($query);

    if($result) {

    print "Table inserted";

    }

    else {

    print "Table not inserted";

    }

    mysql_close();

    ?>
  6. #4
  7. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    Get phpMyAdmin, at http://www.phpwizard.com, for the easiest way to administer MySQL.

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 07:02 PM
  2. Upgrade from access to mysql
    By karib1 in forum ASP Programming
    Replies: 7
    Last Post: December 16th, 2003, 01:35 PM
  3. Upgrade from access to mysql
    By karib1 in forum MySQL Help
    Replies: 1
    Last Post: December 16th, 2003, 01:27 AM
  4. problem: asp files, from access to mysql
    By karib1 in forum MySQL Help
    Replies: 1
    Last Post: November 26th, 2003, 04:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo