Gossamer Forum
Home : General : Perl Programming :

PhpMyAdmin/MySQLMan

Quote Reply
PhpMyAdmin/MySQLMan
I've been trying to dump the structure of my database this evening with MySQLMan and it works fine, but when I tried running it back through the monitor it gives a syntax error. So I thought maybe it was a mysqlman bug so I tried with PhpMyAdmin and the same thing happens.

The structure is:

Code:
CREATE TABLE Members (
ID int(5) NOT NULL auto_increment,
Full_Name varchar(25) NOT NULL default '',
Username varchar(15) NOT NULL default '',
Password varchar(15) NOT NULL default '',
Contact_Email varchar(35) NOT NULL default '',
Email varchar(35) NOT NULL default '',
Active tinyint(1) NOT NULL default '1',
Digest tinyint(1) NOT NULL default '0',
Last_Sent int(12) default NULL,
PRIMARY KEY (ID),
UNIQUE KEY ID (ID,Username,Email,Contact_Email)
)

The weird thing is, when I run it from the MySQL Monitor using SSH it creates the table with no errors. Any ideas?

The error given is:

You have an error in your SQL syntax near 'CREATE TABLE Members ( ID int(5) NOT NULL auto_increment, Full_Name varchar(' at line 5

Thanks!


Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Hi Paul,

It worked without error for me in MySQLMan 1.08.

Regards,
Charlie
Quote Reply
Re: [CP] PhpMyAdmin/MySQLMan In reply to
Oh bummer - didn't realise 1.08 was out - Im using 1.07

I'll upgrade and try again.

Thanks.
Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Hmm, I guess v1.08 isn't out yet. I ran it through the GMail admin link to MySQLMan which shows v.108.

Regards,
Charlie
Quote Reply
Re: [CP] PhpMyAdmin/MySQLMan In reply to
Hmm where did you get 1.08 from ?

I downloaded a new copy and it unzips into a directory called mysqlman 1.06, but the templates show 1.07.......weird.
Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Ignore above we posted together
Quote Reply
Re: [CP] PhpMyAdmin/MySQLMan In reply to
I just tried to create the table with DBI and get the same error.

This is weird.
Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Hi,

What version of MySQL are you using? I cut and paste the SQL into MySQL and it worked ok.

Try removing columns and paste it in until you find the line with the error.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] PhpMyAdmin/MySQLMan In reply to
Hi,

I've tried removing lines and it seems like it is the 1st line:

ID int(5) NOT NULL auto_increment,

At one point it said only one column can be auto-increment and it must the primary key (which it was/is).

Im using version MySQL v3.23.36


Last edited by:

RedRum: Oct 1, 2001, 12:40 PM
Quote Reply
Re: [Alex] PhpMyAdmin/MySQLMan In reply to
Shock, horror......I've fixed it.

I was using DBI to query from a file and the newlines were causing the problem.

Using s/\n//g; fixed the problem.

Thanks for your help.
Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Where did you plug in your fix, Paul?

Does that go into MysqlMan or phpMyAdmin somewhere?

I have had similar probs uploading a newly generated dump.

Thanks Smile

DT
Quote Reply
Re: [DogTags] PhpMyAdmin/MySQLMan In reply to
I put it in my script where it read the file inside a while loop.
Quote Reply
Re: [RedRum] PhpMyAdmin/MySQLMan In reply to
Thanks, Paul.

SmileSmile

DT