A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: mySQL help

  1. #1
    Banned vampstko's Avatar
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    946

    mySQL help

    hey all...i am sooooooooo new to any type ofcodeing and i need a lil help,, i need to create a sql file for tables on a remote server i sent my host an email asking about it and this was his reply
    Usually scripts will make the tables, or you can make them via ssh using mysql command line. This is not something we can provide support on as it is more of DB admin issue.
    and ya know what that dosen't make a lick of sense..can anyone maybe clear this up for me a bit..thanks a lot
    charlie
    (vampstko)

  2. #2
    The best advice you'll ever get regarding MySQL is to download a program called phpMyAdmin and upload it to the server (you can do it remotely). Basically, this program makes it so that you can just point and click and your SQL commands will be executed (eg create table, etc.) It allows you to "dump" your database into a text file(*.sql) .. reversely, you can cut and paste a *.sql file into phpAdmin, and everything will be set up for you. I'd definitely get this, it's what I used when I was starting out.

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    if phpmyadmin is not an option (btw: many hosts provide it as a service to their customers, or to avoid answering mails), you can actually put mysql into a php script like
    <?
    mysql_connect("localhost", "****", "*****") or die("cannot connect - user / pw wrong?");
    mysql_select_db("databasename") or die("cannot use db databasename");
    mysql_query("create table xyz (
    id int non null auto_increment,
    user varchar(30),
    pass varchar(32),
    primary key (id),
    unique (user)
    )") or die("cannot create table, error is " . mysql_error());
    print "db created";
    ?>

    Musicman

  4. #4
    Banned vampstko's Avatar
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    946
    Originally posted by Musicman
    Hi,



    Musicman
    thanks for your help ..but i keep getting this error

    cannot create table, error is You have an error in your SQL syntax near 'non null auto_increment, user varchar(30), pass varchar(32), primary key (id)' at line

    <shrugs>

  5. #5
    Banned vampstko's Avatar
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    946
    Originally posted by Sysdomatic
    The best advice .... I'd definitely get this, it's what I used when I was starting out.
    i had a hell of a time with this one check out this

    Notice: Undefined index: scheme in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php on line 23

    Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php:23) in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php on line 25

    Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php:23) in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/libraries/ob.lib.php on line 65

    Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php:23) in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/header.inc.php on line 27

    Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php:23) in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/header.inc.php on line 28

    Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/main.php:23) in /usr/local/apache/www/oktgp.com/htdocs/phpMyAdmin/header.inc.php on line 29

    etc etc etc etc

  6. #6
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    those crazy little typos:
    this line should read
    id int not null auto_increment,

    Musicman

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center