Any MySQL DB experts here ?

remcy007

Disciple
Dec 29, 2005
95
0
0
I am getting this error in MySQL when we try to create table in it.

ERROR:
DBI/DBD Error:
Can't execute SQL statement:
Can't create table 'MASTER1' (errno: 13)
DBI/DBD Error:
Can't execute SQL statement:
Can't create table 'ABMASTER1' (errno: 13)

Any clues??

MySQL version is 4.1.21
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
You probably have not connected to DB properly. Have u selected the DB ??

If you sure you have connected properly then your user does not have permissions create on that DB.

You using some Web Based DB Administrator ??
 

remcy007

Disciple
Dec 29, 2005
95
0
0
We have Third party Application that uses MySQL as its backend.

We are in process of Upgrading the Third Party application. So we got a script from our application vendor which we have to run. This script upgrades the application and creates few new tables in MySQL. But when we run the script,it gives this error and fails.
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
Then check for the username and pass and whether it has permissions on that DB.

Can u manually log on to the DB ??

And run some select query on the DB to see if connection is a problem or not .
 

Arya

Adept
Aug 14, 2006
742
59
117
Is the frontend made in perl? most probably its an issue of non existing database/incorrect user. verify from the upgrade document if you've created the database/ user with appropriate rights.
 

KiD0M4N

Skilled
Aug 24, 2005
1,379
102
0
39
www.erodov.com
remcy007 said:
I am getting this error in MySQL when we try to create table in it.

ERROR:

DBI/DBD Error:
Can't execute SQL statement:

Can't create table 'MASTER1' (errno: 13)

DBI/DBD Error:
Can't execute SQL statement:

Can't create table 'ABMASTER1' (errno: 13)

Any clues??

MySQL version is 4.1.21

ok i hv come accross this issue before hand and you wont beleive what was causing this.

a previous installation in the same location.

i had selected InnoDB as my storage engine and it creates transaction logs (files basically which store the transaction data since InnoDB is a Transaction enabled DBMS) which persisted through to my next installation.

And I got these errors + many more (like authentication error, et cetera.)

My first line of attack towards this issue would be a uninstallation followed by deletion of the directory in which MySQL was installed. Then download latest version of MySQL from MySQL AB :: The world's most popular open source database and install it (i believe its 5.1, much better and scalable compared to 4.x and has support for triggers, stored procedures and many more)

However, if this is not the issue, I beleive you dont have read access to the "sys" tables. As "METADATA" about the tables you create (like information about the columns, the datatypes, the primary + foreign keys, indices etc) also need to be stored in some table, the problem could be manifesting itself because the engine (same as the MySQL backend) is unable to create the requisite meta data to describe the table and thus you are not able to create the tables.

Any ways, try boh approaches and report back.
 

KiD0M4N

Skilled
Aug 24, 2005
1,379
102
0
39
www.erodov.com
arya said:
Is the frontend made in perl? most probably its an issue of non existing database/incorrect user. verify from the upgrade document if you've created the database/ user with appropriate rights.

I agree with arya on this. Could be a interoperability issue or somethign as subtle as a insuitable user account (under priviledges) or a mal formed host string. Please check these up.
 

Arya

Adept
Aug 14, 2006
742
59
117
I highly doubt it is InnoDB issue. the application seems to be old one and most likely to be on MyISAM. Moreover Installing newer version can create new problems of compatibility. It will be best to do the upgrade on the same version that of production server and later upscale to new version.

However there can be many possiblities. It will be best if you could give a little idea about the application.

personally I still prefer MyISAM, kinda reliable :p
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
remcy007 said:
DBI/DBD Error:
Can't execute SQL statement:
Can't create table 'MASTER1' (errno: 13)
DBI/DBD Error:
Can't execute SQL statement:

This is Perl.

Cant execute statement errors normally occur with Privilege issues.

@Karan. Do u really take that approach in production environment ??? MySQL never normally need a reinstall unless u r upgrading. Atmost u can restart MySQL.
And are u talking about MySQL on windows ?? lol
 

Arya

Adept
Aug 14, 2006
742
59
117
I suppose he was addressing the storage engine problem, which is a distant possibility.

however wats up with MySQL on windows? I think it runs pretty cool...and easier to manage on windows than linux.
 

KiD0M4N

Skilled
Aug 24, 2005
1,379
102
0
39
www.erodov.com
Josh said:
This is Perl.

Cant execute statement errors normally occur with Privilege issues.

@Karan. Do u really take that approach in production environment ??? MySQL never normally need a reinstall unless u r upgrading. Atmost u can restart MySQL.

And are u talking about MySQL on windows ?? lol

nothing to lol about there mate.... i have been forced many times to run the bad (as according to ur statements) version of MySQL because of a production necessity. And, THERE is nothing in the book you cant throw to debug a issue. Ofcoruse, this was assuming from his post that he did not have the database setup in first place which meant he didnt have any worth while data he wanted to be kept safe.
 

mediator

Disciple
Sep 6, 2006
7
0
0
There may be various reasons for such error.A few that I know are

1. mysql service is not running

2. database name given may be wrong or incorrect

3. sql command may be syntactically wrong

4. Table might be created already. (This happened to me like 70% time)

5. Username,pass given for connecting to db may be wrong or unpriviedged!

Check them out