Solved

mysql table type specification error.

Posted on 2011-09-18
7
296 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 82

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now