I got this error ERROR 1036 (HY000): Table 'AvailCounterDaily' is read only when i trying to run sql file from my desktop. like
mysql> source Desktop/file_name.sql
please, tell me how to solved? I change permmision of file/folder to 777 or 755 (try both).
Maybe you have no GRANT to change data or table structure on this table 'AvailCounterDaily'. Please check or ask your admin.
Related
When trying to drop a database in MySQL
'DROP DATABASE IF EXISTS temporarydata'
I am getting the following error
Error Code: 1010. Error dropping database (can't rmdir '.\temporarydata', errno: 13)
I have researched into this and I think it may be a permission issue, however all the fixes I have found have been for linux computers. Has anyone got any idea how to sort this out in windows 7?
Errno 13
MySQL has no write permission on the parent directory in which the temporarydata folder resides.Check it out
A database is represented by a directory under the data directory, and the directory is intended for storage of table data.
The DROP DATABASE statement will remove all table files and then remove the directory that represented the database. It will not, however, remove non-table files, whereby making it not possible to remove the directory.
MySQL displays an error message when it cannot remove the directory, you can really drop the database manually by removing any remaining files in the database directory and then the directory itself.
I know its over 1 year since this thread was created but I think I should share to you my experience with this problem and the solution I've made. Note, its for those who uses MySQL Workbench in Windows 7.
Go to the directory C:\ProgramData\MySQL\MySQL Server 5.6\data (In some instances, if you cannot see the ProgramData folder, then unhide
it first using the Folder and search options.)
You can see in there the folder of that database (eg. temporarydata).
Delete that folder.
Rerun your sql script.
drop database temporarydata;
Hope this helps.
If you use wampserver and mariadb you can go directly here and delete the folder of your database :
C:\wamp64\bin\mariadb\mariadb10.2.8\data
I experienced the same problem. I am describing below my solution:
mysql> DROP DATABASE mydatabase;
ERROR 1010 (HY000): Error dropping database (can't rmdir '.\mydatabase', errno: 13)
I went to delete this directory: C:\Users\jaimemontoya\...\core\mysql\data\mydatabase.
mysql> DROP DATABASE mydatabase;
ERROR 1008 (HY000): Can't drop database 'mydatabase'; database doesn't exist
mysql> CREATE DATABASE mydatabase;
Query OK, 1 row affected (0.00 sec)
That created again folder C:\Users\jaimemontoya\...\core\mysql\data\mydatabase containing this file: db.opt.
mysql> SHOW databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql> exit
Bye
After the database was created, I imported data to the database and my C:\Users\jaimemontoya\...\core\mysql\data\mydatabase was populated with many more files. Three files per table of my database using the following extensions:
[table].frm
[table].MYD
[table].MYI
Manually delete database in
C drive->Mysql Folder->data Folder-> your database name
it works for me hope it will work for you
For Mac users
go to path:
/Applications/XAMPP/xamppfiles/var/mysql/NAMEOFDATABASE
and delete it manually
This is quite odd, it's happening only for a some Databases, but I get this error:
ERROR 1010: Error dropping database (can't rmdir './main', errno: 66)
SQL Statement:
drop database `Main`
This happens over and over, even on Root user...
This happens even if there is nothing in the database.
mysql> drop database DB_NAME;
ERROR 1010 (HY000): Error dropping database
(can't rmdir './DB_NAME', errno: 66)
1) mysql -e "select ##datadir" -> /usr/local/mysql/bin/mysql
2) Go to DB folder: cd /usr/local/mysql/data/
3) Delete DB folder of DB with issue (in this case: "DB_NAME")
Source stack overflow
I figured out, and it wasn't all that hard, using the OS X terminal I entered this in:
open /usr/local/mysql/data/
then, I just deleted the folders. An admin password was required though.
Thanks to anyone that offered to help
I want to get information from COLUMNS of information_schema. I execute the following command:
root:information_schema> select * from COLUMNS;
but it occur the error:
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_11b6_0.MYI'; try to repair it
So I want to repair the table. I execute the following command:
root:information_schema> repair table COLUMNS;
but it occur error again,the wrong content follow:
ERROR 1044 (42000): Access denied for user 'root'#'localhost' to database 'information_schema'
I don't why the root user have no privileges to repair the table
When you see something like '/tmp/#sql_XXXXX_X.MYI', the problem is your file system is full and the temporary file needing to be created can't be written to. Remove any unnecessary files and try again.
I run this command in mysql:
mysql > show databases;
My database called publications is there so I want to use it:
mysql > USE publications
But I get an error:
ERROR 1049 (42000): Unknown database 'publications'
mysql > CREATE DATABASE publications;
ERROR 1007 (HY000): Can't create database 'publications'; database exists
Have I corrupted something? It is on XAMPP on thumb drive. What does this error mean?
you may not have permissions. open up the mysql database, and double check that mysql.db table has the user you are logged in as set up to read, write, etc.. as appropriate. after changing permissions, don't forget to FLUSH PRIVILEGES
When I try to change the priveleges on a mysql db I get the following error:
Please make sure the used account has rights to the MySQL grant tables. Error executing 'DESCRIBE mysql.db'
Is this also why it will not let me import tables in from another DB? When i try I get the error:
Operation failed with exitcode 1
09:20:16 Restoring D:\design and photos\boo.com\db dump\070113.sql
Running: mysql.exe --defaults-extra-file="c:\users\darren\appdata\local\temp\tmpslubjs.cnf" --host=87.117.239.19 --user=boo8_yu52 --port=3306 --default-character-set=utf8 --comments < "D:\design and photos\boo.com\db dump\070113.sql"
ERROR 1044 (42000) at line 1: Access denied for user 'boo8_yu52'#'%' to database ' boo8_6652'
It does however let me create tables manually. Can't work it out at all.
make sure that the account you are using is granted with grant option
and the account should have permissions on mysql database in which the db grant table exits
or the best way is to assign the permission with the root account
see the link below may be useful for you
http://blog.loftninjas.org/2008/04/22/error-1044-42000-at-line-2-access-denied-for-user-root-to-database-db/