Skip to main content
Inspiring
December 18, 2006
Question

MySQL Error 1064

Hi guys,
I have this table I wish to create in MySQL but it does not seem to let me create it.
Is it due to this: ENGINE=MyISAM
I would like to know how I can get rid of this error

mysql> CREATE TABLE `mall_admin` (
-> `AdminID` int(10) NOT NULL auto_increment,
-> `AdminUsername` varchar(50) NOT NULL default '',
-> `AdminPassword` varchar(50) NOT NULL default '',
-> PRIMARY KEY (`AdminID`),
-> UNIQUE KEY `AdminUsername` (`AdminUsername`)
-> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
ERROR 1064: You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CH
ARSET=latin1 AUTO_INCREMENT=2' at line 7
mysql>

Can anyone shed some light on this?
This topic is closed to new replies. Start a new post to keep the conversation going.

9 replies

Inspiring
December 21, 2006
Ok just an update.
Some how, I had two installations of MySQL 3.23 1 on main C:\ and one in the Sokkit folder. got rid of the ones that were running and started afresh everything is fine, but my username is root and what I had previously.
Translate
Inspiring
December 20, 2006
The_FedEx_Guy wrote:
> I did remove the service, but I still cant create the service for 4.1
> Is there somewhere I can hardcode the location of the 4.1 installation?

I would suggest uninstalling 4.1 and starting again. It's a very long
time since I switched from MySQL 4.0 to 4.1 (I now run 5.0), so it's
hard to remember details. I think I made the mistake of uninstalling 4.0
without removing the MySQL service, so I had to uninstall 4.1, reinstall
4.0, and remove the service. I then uninstalled 4.0, and then 4.1
installed without problem.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Inspiring
December 20, 2006
I did remove the service, but I still cant create the service for 4.1
Is there somewhere I can hardcode the location of the 4.1 installation?
Translate
Inspiring
December 19, 2006
Why not install PHPMyAdmin, and let it create the table structure for you,
makes life much easier! http://www.phpmyadmin.net/


--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.


Translate
Inspiring
December 19, 2006
The_FedEx_Guy wrote:
> ERROR 1064: You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT
> CH
> ARSET=latin1 AUTO_INCREMENT=2' at line 7
> mysql>

The ENGINE option was added to MySQL in the 4.1 series, I think. If you
are using an earlier version of MySQL, omit everything after and
including ENGINE.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Inspiring
December 19, 2006
Lastnite, I installed MySQL 4.1 downloaded from the MySQL site.
The Windows installer installed it, but did not have much success in making it a service (I'm using WinXP Pro SP2)
When I run, the MySQL command prompt, it reads the version number at the top as MySQL 3.23 -debug

MySQL 3.23 was my previous installation, I followed all the steps to install it correctly. But It does not show version 4.1
But in "PHPINFO" it shows that I have MySQL 4.1 installed.

I'm not sure if another instance is running of MySQL running.
I also tried to install phpMyAdmin, without much success. My webserver (sokkit 4) seemed to only pick up the previous version folder which I renamed to phpMyAdmin_old

Not sure whats going on in my system.
Translate