“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Pete Letkeman wrote:Have you looked into running any of the MySQL tools to repair tables and databases such as this tool
https://dev.mysql.com/doc/refman/5.7/en/mysqlcheck.html?
From the command prompt you could run:
mysqlcheck --all-databases --auto-repair
You will fine mysqlcheck in the MySQL\bin directory.
There is also a chance that you are have not used the use database command.
Assuming that the name of the database is test and that the name of the table is named test_table what are the results when you try this?
USE test;
SELECT * FROM test_table;
Alternatively you could run this command:
SELECT * FROM test.test_table;
tangara goh wrote:When I run a query to show all the tables in my database.
It shows the table name.
when I run a select * from tablename, it gives me error 1146.
But, when I tried to insert some dummy data, it said it does not exists.
So, I tried to drop the table. But, it doesn't work either cos it gives me error :1051 unknown table.
Jeanne Boyarsky wrote:Tangara,
Try to look if the table is in a schema. If it was created under one user/schema and you are trying to access it using another, you'd need to write schema.test_table.
tangara goh wrote:C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqlcheck --all-databases --auto-repair
mysqlcheck: Got error: 1045: Access denied for user 'ODBC'@'localhost' (using password: NO) when trying to connect
Liutauras Vilda wrote:Could you please support these statements with some copied/pasted snippets?
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|