Solved

mysql table type specification error.

Posted on 2011-09-18
7
312 Views
Last Modified: 2012-05-12
Hello:

I am getting an error when I specify the table type in mysql, Please see attached jpeg image which shows what is going wrong. when I create a table using following:
CREATE TABLE TEST( name VARCHAR(100))TYPE=innodb;

Open in new window

I get an error.
However when I write the same query without specifying type as follows:
CREATE TABLE TEST( name VARCHAR(100));

Open in new window


I get no error. How do I resolve this? Any help would be appreciated.
Thanks,


NOTE: IN the attached png file, in the first query, in  the type specifier part (i.e. TYPE = innodb) , you will see a "-" sign...i.e. TYPE - innodb. Please note that the query I ran contains "=" as specified in the code above.. Its just that when I captured the window image I lost one "-" of the "=" sign,

Thanks.
    table type specifier error.
0
Comment
Question by:arjoshi77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 23

Expert Comment

by:nemws1
ID: 36558357
Maybe you don't have the INNODB database enabled (or perhaps not even compiled in)?

Run 'mysqladmin variables' and look for the 'innodb_*' entries.
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 36558375
The solution to this is
Edit the file D:/xampp/htdocs/symfony_1_4/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder/sql/mysql/MysqlDDLBuilder.php
Line 156, change
$script .= “Type=$mysqlTableType”;
to
$script .= “Engine=$mysqlTableType”;

refer
http://www.vinodkram.com/mysql-error-while-executing-propelinsert-sql-in-symfony-1-4
0
 

Author Comment

by:arjoshi77
ID: 36558432
nemws1:

I ran the command  'mysqladmin variables' you mentioned. There are no 'innodb_*" entries. I have installed mysql uaing mysql-5.5.10-win32.msi binary. What do I do now? Please help.

0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36558516
Run 'mysql' and type "SHOW ENGINES\G" and it will list what is installed.  http://dev.mysql.com/doc/refman/5.5/en/storage-engines.html
0
 
LVL 23

Expert Comment

by:nemws1
ID: 36561690
Weird.... If you're running MySQL 5.5, InnoDB is the default engine (ie: you don't need to say InnoDB to get an InnoDB table).  Regardless, specifying it should still work.  I had tested your commands on a 5.1 install and they worked just fine.  Downloading a fresh copy of 5.5 to test with ... back in a few minutes.
0
 
LVL 23

Accepted Solution

by:
nemws1 earned 500 total points
ID: 36561783
Yup.  Just installed the lastest 5.5 (I'm on a Mac, tho) and when I do a simple 'CREATE TABLE...' with no TYPE or ENGINE defined and then do a 'mysqldump DBNAME test' it reports it as an InnoDB table.

If I try your command:
CREATE TABLE TEST( name VARCHAR(100))TYPE=innodb;

Open in new window


It fails... seems the TYPE keyword is no longer supported.  Use ENGINE instead:
CREATE TABLE TEST( name VARCHAR(100)) ENGINE=innodb;

Open in new window

and it should work!
0
 

Author Closing Comment

by:arjoshi77
ID: 36565781
thanks very much. The engine type specifier worked.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question