cancel
Showing results for 
Search instead for 
Did you mean: 

mysql error Can't create/write to file

senthil_chinnai
Champ in-the-making
Champ in-the-making
Hi All:

Please help, I am getting these errors suddenly. I am using MySql on Windows.

Caused by: java.sql.SQLException: Can't create/write to file 'D:\Work\MySql\Data Files\#sql_149c_0.MYD' (Errcode: 17)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1166)
        at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2046)
        at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaData.java:76)
        at com.mysql.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:1920)
        at org.hibernate.tool.hbm2ddl.TableMetadata.initColumns(TableMetadata.java:185)
        at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:33)
        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:85)
        … 35 more
5 REPLIES 5

kevinr
Star Contributor
Star Contributor
This looks like a MySQL issue rather than an Alfresco one:

System error: 17 = File exists

For some reason your system is trying to create a tmp file that already exists. I'd try cleaning out your tmp and any mysql tmp directories.

When i googled for the issue it seems to be one other people have had using MySQL (but not Alfresco related).

Thanks,

Kevin

andy
Champ on-the-rise
Champ on-the-rise
Hi

I would check you are using InnoDB - my memory - I think that file extension indicates you are using myISAM tables.

Regards

Andy

senthil_chinnai
Champ in-the-making
Champ in-the-making
Thanks Andy & Kevin. The problem is fixed now. Newer version of McAfee was protecting MySql temporary folder. I have added the temporary folder into McAfee's exclude list and it worked.

Thanks for very much for your valuable suggestions.

Senthil.

mialfresco
Champ in-the-making
Champ in-the-making
Hi senthil,
I'm also facing the same problem…. from a long time..
Can you provide the complete solution for this.
I'm using  Alfresco labs 3.0 stable version and mysql 5.0.18
Even I tried to disable Mcafee "On Access Scan" but still facing the problem.
IS there any other solution for this? if yes please post it.

Thanks in advance.

mikeh
Star Contributor
Star Contributor
It's McAfee - disable the service and the problem will go away. You just need to exclude the MySQL filetypes. There's more info on the MySQL forums.

Thanks,
Mike