Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

MySQL Error 1064

Participant ,
Dec 18, 2006 Dec 18, 2006
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?
TOPICS
Server side applications
810
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 18, 2006 Dec 18, 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 19, 2006 Dec 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2006 Dec 19, 2006
The_FedEx_Guy wrote:
> MySQL 3.23 was my previous installation, I followed all the steps to install
> it correctly. But It does not show version 4.1

Did you bother to read the following note on the downloads page of the
MySQL site?

"Note: When upgrading from versions of MySQL prior to 4.1.5, you must
uninstall the existing version before installing a new version."

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 19, 2006 Dec 19, 2006
Hi, Yes that was the first thing I did!
So I do not understand why I'm getting the problem.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2006 Dec 19, 2006
The_FedEx_Guy wrote:
> Hi, Yes that was the first thing I did!
> So I do not understand why I'm getting the problem.

Did you remove the MySQL service first? If not, go to Control Panel >
Administrative Tools > Services. Find the MySQL service, right-click,
and select Properties. Set the startup option to disabled. Then
reconfigure MySQL 4.1 and create a MySQL service with a different name,
such as mysql41.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2006 Dec 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 20, 2006 Dec 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 20, 2006 Dec 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 21, 2006 Dec 21, 2006
LATEST
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines