why the table of information_schema is damaged? - mysql

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.

Related

Not enough privilege to view users in phpmyadmin

I can't see users in phpmyadmin on windows server 2012. It gives the error:
Not enough privilege to view users.
Warning in .\libraries\classes\Dbi\DbiMysqli.php#213 mysqli_query(): (HY000/1194): Table 'user' is marked as crashed and
should be repaired
How can I resolve this error?
The error, Not enough privilege to view users in phpmyadmin can also occur when importing an older MySQL database into a newer MariaDB instance via a SQL dump due to changes in how the users are stored.
Other symptoms include:
The command select * FROM mysql.user; returns the error message:
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
The command select * FROM mysql.tables_priv; returns an empty result set.
The solution:
As the database root user, run the following queries:
use mysql;
INSERT INTO `tables_priv` (`Host`, `Db`, `User`, `Table_name`, `Grantor`, `Timestamp`, `Table_priv`, `Column_priv`) VALUES ('localhost','mysql','mariadb.sys','global_priv','root#localhost','0000-00-00 00:00:00','Select,Delete','');
Then restart the MariaDB server.
Credit: IgorG on the Plesk forums. (https://talk.plesk.com/threads/view-mysql-user-references-invalid-table-s-or-column-s-or-function-s-or-definer-invoker-of-view-lack-rights-to-use-them.363334/)
You have to repair your user table. Use a SQL query like 'REPAIR TABLE user' or repair it using phpmyadmin .

Can't create a user on MySQL?

I am typing the following into the command prompt:
GRANT ALL ON publications.* TO 'jim'#'localhost'
IDENTIFIED BY 'mypasswd';
I keep getting
ERROR 126: Incorrect key file for table. .\mysql\dbi.MYI': try to
repair it.
How do I repair dbi.MYI? I read somewhere that my tmp folder might be too small? If that's the case how do I increase the size?

ERROR 1036 (HY000): Table 'Atable_name' is read only

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.

MYSQL error: Can't create database 'publications'; database exists

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

Mysql Workbench priveleges, data import

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/