cmusselm has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone known how to create a table or perform any other DDL commands with Net::MySQL? I can use it to insert, update, and delete: $mysql->query(q{delete from emp where empno=5}); But table creation doesn't work: $mysql->query(q{create table emp (empno int)}); Any ideas? Thanks, Chad

Replies are listed 'Best First'.
Re: How to create a table using Net::MySQL
by dws (Chancellor) on Feb 12, 2005 at 07:22 UTC

    Any ideas?

    Check that you've been GRANTed permission to create tables in whatever database you're using.

    Failing that, consider moving the DBD::MySQL. The DBI interface affords better error reporting.

Re: How to create a table using Net::MySQL
by trammell (Priest) on Feb 12, 2005 at 13:26 UTC
    Just a hunch, but does the user you're logging in as have "create" permission?
      Once again, I'm my own worst enemy. Thanks for the help, it was the permissions. Chad
      As you might have read, 'dws' alreaddy gave that answer: 'Check that you've been GRANTed permission to create tables in whatever database you're using', no need to answer this twice.