Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Closed Points: 125 Time: 10:51 - Nov 14, 2008  

jgivoni

When trying to alter a table in MySQL, I get "Error on rename... (Errcode: 13)"

I am trying to add a simple column, like so many times before:

ALTER TABLE main_user ADD `member_rank` int(11) NULL DEFAULT NULL

But the operation fails with MySQL saying:

Error on rename of '.\hoytocoyo\main_user.MYI' to '.\hoytocoyo\#sql2-ad4-9c.MYI' (Errcode: 13)

I am running Windows Vista, Apache 2.2.3, MySQL 5.0.27

It seems to me that trying to rename a file to something including a "#" symbol is bound to fail, since this character is not allowed...
What can I do?

Answer Discussion
Tutorials

 

nidhi

Date:: Nov 14, 2008

Time:: 13:26

error code 13 can also mean permission denied right? I assume that write permissions have been set? and of course mysql is running.

# is a valid character in windows xp, I assume it would be the same in vista.

Im a little confused though by your comment. You gave sql to add a column but you are talking about the rename of a file

shashi.programmer

Date:: Nov 15, 2008

Time:: 00:47

"ALTER TABLE table_name ADD `member_rank` int( 11 ) NULL DEFAULT NULL" Your code is right and error code 13 is regarding permission that means you don't have the right to alter the table.

You can grant user permissiom like this:
USE table_name
GO
GRANT VIEW ANY DEFINITION TO user_name

jgivoni

Date:: Jan 06, 2009

Time:: 01:41

Yes, my SQL query is correct and yet my MySQL server returned an error message when trying to execute the query.

Eventually it was simply solved by restarting MySQL, but it kept popping up from time to time. Sometimes my tables also locked and newly inserted data disappeared without warning.

In the end I think it had to do with the MySQL service being run with insufficient user permissons in Vista, or the files being protected from modification by the user runnung the MySQL service.

So I changed the security options for the "mysql" folder and subfolders by right clicking on it, choosing "Properties" and going to the "Security" tab. There I made sure that the default user had "Full control" ticked and applied the changes.

Since then I've had none such problems.

PS: It might be interesting for others to know that my invironment (apache, php, mysql) was originally installed via "EasyPHP 2.0b1" so it seems that this application was the one messing things up to start with, perhaps because it wasn't yet fully compatible with Windows Vista.

Anpanman

Date:: Jan 07, 2009

Time:: 09:42

thanks, this has helped me as well

priyagrandhi

Date:: May 12, 2009

Time:: 07:05

Thanks, This helped me a lot.

Question Answered

This question has been closed, and points have been rewarded to the following experts:


nidhi: 10
shashi.programmer: 10
jgivoni: 105

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No tutorials have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10279

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es