Solved

mysql table type specification error.

Posted on 2011-09-18
7
306 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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