Error 6 Hy000
Contents |
to drop a MySQL database say my_database then the reason for this is File Permissions (Error code error 6 hy000 error on delete 13). Whenever we crate a database, a directory is created under
Mysql Errcode 13 Error On Delete
mysql/var/ ( XAMPP : XAMPP/xamppfiles/mysql/var/) with the same name as that of your database, this directory contains a mysql errcode 13 permission denied file called db.opt which contains metadata related to the database. OK! but Why this error ? : All MySQL related files are stored in your filesystem, if you try to DROP the database, the corresponding db.opt and the db directory is to be deleted but it maybe so that you do not have permissions to delete directories and files. Error on delete db.opt Errcode 13 Permission denied How can I get Access to delete db.opt file and hence the database : Locate your database directory. Check its access permissions Change it to something like 0777 using CHMOD command recursively. Now try to run DROP database
Disha Email Updates: Status: Not a Bug Impact on me: None Category:MySQL Server Severity:S3 (Non-critical) Version:5.0.7 Beta OS:Microsoft Windows (Windows) Assigned to: Ingo Strüwing View Add Comment Files Developer Edit Submission View Progress Log Contributions [6 Jul 2005 9:23] Disha Description: If we try to drop a table used in merge table then incorrect error is displayed. How to repeat: 1. Start the MySQL client and connect to the database with valid user and password. 2. Set the delimiter to // http://code2care.org/2015/mysql-6-error-on-delete-of-databasedb.opt-errcode-13-permission-denied/ 3. Create two tables as follows and insert values in it: create table t1(f1 int, f2 char(10))// create table t2(f1 int, f2 char(10))// insert into t1 values(1,'a')// insert into t2 values(2,'b')// 4. Create a merge table as follows and insert values in it: create table t3(f1new int, f2ne2 char(10)) type=merge union=(t1,t2) insert_method=first// insert into t3 values(3,'c')// 5. Now try to https://bugs.mysql.com/bug.php?id=11763 delete the base table (that is either t1 or t2) as follows: drop table t1// Expected Results: 1. Appropriate error should be displayed as the table is used in a merge table. Actual Results: 1. Incorrect error is displayed as follows: "ERROR 6 (HY000): Error on delete of '.\test\t1.MYI' (Errcode: 13)" [17 Jul 2005 19:45] Sergei Golubchik Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: This is documented as * You can't use DROP TABLE, ALTER TABLE, DELETE FROM without a WHERE clause, REPAIR TABLE, TRUNCATE TABLE, OPTIMIZE TABLE, or ANALYZE TABLE on any of the tables that are mapped into a MERGE table that is ``open.'' If you do this, the MERGE table may still refer to the original table and you get unexpected results. The easiest way to work around this deficiency is to issue a FLUSH TABLES statement to ensure that no MERGE tables remain ``open.'' http://dev.mysql.com/doc/mysql/en/merge-table-problems.html [1
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://dba.stackexchange.com/questions/42656/error-13-hy000-when-creating-database the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions http://www.developpez.net/forums/d1011932/bases-donnees/mysql/administration/error-6-hy000-error-on-delete/ Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn error 6 from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ERROR 13 (HY000) When Creating Database up vote 1 down vote favorite I'm trying to create a database and when I type in error 6 hy000 CREATE DATABASE epik; I get the error ERROR 13 (HY000): Can't get stat of './epik' (Errcode: 13) I am running kubuntu 13.04 with mysql 5.5.31. mysql mysql-5.5 database-administration share|improve this question edited May 21 '13 at 0:58 Yasir Arsanukaev 2,38121126 asked May 21 '13 at 0:18 Zach Russell 11115 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted Errcode: 13 is a file permission issue. If your datadir is /var/lib/mysql, do the following: cd /var/lib/ ls -l Check the file permissions as make sure /var/lib/mysql is owned by mysql:mysql. If it is not, then do this: chown -R mysql:mysql /var/lib/mysql If you ran sudo, you are probably root. Make sure root can write into /var/lib/mysql Give it a Try !!! share|improve this answer answered May 21 '13 at 1:17 RolandoMySQLDBA 107k15138274 Fixed it! Thank you so much –Zach Russell May 21 '13 at 2:47 To clarify for future folks: I had to use sudo chown -R mysql:mysql /var/lib/mysql, otherwise I got permission changing rights errors. –khav
Merise UML JavaPlateforme et langage Java Java Java Web Spring Android Eclipse NetBeans .NETMicrosoft Framework .NET Microsoft DotNET Visual Studio ASP.NET C# VB.NET Windows Phone Microsoft Azure Dév. WebDéveloppement Web et Webmarketing Développement Web AJAX Apache ASP CSS Dart Flash / Flex JavaScript PHP Ruby & Rails TypeScript Web sémantique Webmarketing (X)HTML EDIEnvironnements de Développement Intégré EDI 4D Delphi Eclipse LabVIEW NetBeans MATLAB Scilab Visual Studio WinDev Visual Basic 6 Lazarus Qt Creator ProgrammationProgrammation et langages de programmation applicatifs Programmation Débuter - Algorithmique 2D - 3D - Jeux Assembleur C C++ Go Objective C Pascal Perl Python Swift Qt XML Autres SGBDSystèmes de Gestion de Bases de Données SGBD & SQL 4D Access Big Data DB2 Firebird InterBase MySQL NoSQL PostgreSQL Oracle Sybase SQL-Server OfficeBureautique pour l'entreprise Microsoft Office Access Excel Word Outlook PowerPoint SharePoint Microsoft Project OpenOffice & LibreOffice Solutions d'entrepriseAutres logiciels pour l'entreprise Solutions d'entreprise Big Data BPM Business Intelligence ERP / PGI CRM SAS Cloud Computing SAP Microsoft BizTalk Server Talend IBM Bluemix ApplicationsApplications logicielles Applications Libres & Open Source OpenOffice & LibreOffice Projets MobilesLogiciels et matériels mobiles Mobiles Android iOS Windows Phone SystèmesLogiciels et matériels systèmes Systèmes Windows Linux Sécurité Hardware Mac Raspberry Pi Réseau Green IT Systèmes Embarqués Virtualisation SGBD 4D Access Big Data DB2 Firebird InterBase MySQL NoSQL PostgreSQL Oracle Sybase SQL-Server ACCUEIL MYSQL FORUM MYSQL F.A.Q MYSQL SOURCES MYSQL TUTORIELS MYSQL OUTILS MYSQL LIVRES MYSQL S'inscrire Aide Quoi de neuf ? Forum Actions Marquer les forums comme lus Bugs & Suggestions Rés