Solved

mysql table type specification error.

Posted on 2011-09-18
7
309 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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