Database table columns missing in MySqlWorkBench - mysql

I am working with mysql workbench 5.2.47 on Mac. I have created new database, table and some columns in the table. Sometimes, when I open this database (connection is fine) in mysql workbench, it is not showing any columns that I created under the table. But, if i close and open mysql workbench multiple times, and then its displaying the columns under that table. It is not happening always, but sometimes only it is not showing any columns that I created under the table.
I couldn't any find solution or workaround what to do this to get the actual columns displayed under the table.
Screenshot for reference:

Solved! Seems like a lot of people are stuck in this odd situation.
There is an easy solution to this.
Hover abbove the "Object Info" and "Session" and your cursor will change to split arrows. Then all you have to do is drag it downward and it will reveal the hidden sidebar with Management, Schemas etc.
Enjoy!

I, personally, faced this problem only when I was disconnected from the server. So, when you try to execute an SQL query you receive an error like:
"Error Code: 2006. MySQL server has gone away."
Go to the option "Query" and then "Reconnect to Server," or simply close the connection and open it again. If yours happens to be the same case as that of mine, you should be able to get the columns displayed again.

Click the little "Refresh" icon (to the right of Schemas). Also, upgrade to Workbench 6.1.x as the 5.2 branch is no longer maintained.

Related

#145 - Table '.\phpmyadmin\pma_recent' is marked as crashed and should be repaired

I have installed Xampp on my Windows 7, and everything was working fine.. I had about 7 WP Websites/Databases setup, all working fine.
Then I got a note displaying at the bottom of one of the pages, saying that I didn't have a root password set, and was at risk. So I stupidly changed all three root users's passwords (ie: root:1 root:localhost root 127.0.0.1). Note: I changed all three to the same password.
Or course that broke Apache server totally. After research, I found that I should change the config.inc.php and add the new password there, and then restart the Server. Thankfully that worked!
But now.. on all my databases and for all tables inside of those DBs.. no matter which table I select to look at, I get this error:
Could not save recent table!
#145 - Table '.\phpmyadmin\pma_recent' is marked as crashed and should be repaired
All the tables seem to display correctly, it just shows this as an error at the top of the results page when I click on any table name. If I click on the same table name again, it displays without the error.. but if I go to another table, then come back to the previous table, the error will display again, etc, etc, etc..
It appears that the websites are still functioning.. and that the database tables can still display with or without the error showing.. and I appear to even be able to edit the tables, but I am not confident that all is well with the xampp install now.
Since this error started displaying straight after the changing of and the fixing of the root password, I have a feeling it is related. (If it makes any difference, under Users.. I still have the following users listed as not having a password set: "any" and "pma".) Does the PMA need to be set to the same password as the root to work properly?
Any help would be greatly appreciated!!!!!
In this case, it probably isn't related to the change of your root password.
Try opening up that table (by expanding "phpmyadmin" in the navigation area then clicking on the "pma_recent" table name). Go to the Operations tab and click the "Repair table" link (which is under the "Table maintenance" heading). This should tell MySQL to repair the table and should clear up your error message.
You could do what was suggested by "Isaac Bennetch" or could alternatively run the following to repair the corrupted table:
REPAIR TABLE 'table_name';

DROP TABLE not working?

I have tried relentlessly to drop a table, but it doesnt seem to work. It doesn't give me any error message, but it seems like its taking a long time (6+ hrs). The table has around 800K rows with two columns.
Additionally, I can't even access the table using sequel pro or through the command line interface. The sequel pro message says Loading, but it never loads and command line gets stuck in the command without any messags.
However, DESCRIBE command works with the table.
I have similar problem with another table that has fairly less number of rows at 1000+.
However, i have other tables in the database that works perfectly fine.
Are there any issues with this version of mysql (see below) or are there any other methods that will let me delete the table.
I am using MySQL 5.1.73 Source distribution

MySQL Error 2013 after a failed attempt to import

I was importing one table in a MySQL Server when the power went down. After this event I tried to query the table I was importing, but got the error 2013, only when I'm querying this table (the others work just fine).
I have physical access to the server, tried to execute any query from there (tried to SELECT, and even DROP TABLE) but still got the same error.
Does anybody know a solution where I can re-build only the table (without building the whole schema from scratch?)
I'm adding this as an answer rather than having lots of comments underneath. I must state in advance that I've not used MySQL but I have used SQL server a lot so I'm hoping that something I say may help.
You say the table is still there. Was it created as part of the operation you were doing or had it been there for a while?
What happens if someone else or a different account tries to access this table?
Is there anything on this page that is relevant to your problem?
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

phpMyAdmin mySql mamp - table does not open

I have a mysql table with just 4 columns and it contains just a bit more than 4800 records. My problem is that I can't open the table to see the content in phpmyadmin. When I try, i have no errors but the page becomes blank. I still have the phpmyadmin column menu on the left. The strange thing is when I try to export the data I can export all the records properly...
By the way I am using MAMP.
Hope someone can help me understand.
I'm a pretty big fan of Sequel Pro on OS X rather than using phpmyadmin. Maybe give that a try.

Is there a way to view past mysql queries with phpmyadmin?

I'm trying to track down a bug that's deleting rows in a mysql table.
For the life of me I can't track it down in my PHP code, so I'd like to work backwards by finding the actual mysql query that's removing the rows.
I logged in to phpmyadmin, but can't find a way to view the history of past sql operations.
Is there a way to view them in phpmyadmin?
Ok, so I actually stumbled across the answer.
phpMyAdmin does offer a brief history. If you click on the 'sql' icon just underneath the 'phpMyAdmin' logo, it'll open a new window. In the new window, just click on the 'history' tab.
That will give you the last twenty or so SQL operations.
There is a Console tab at the bottom of the SQL (query) screen. By default it is not expanded, but once clicked on it should expose tabs for Options, History and Clear. Click on history.
The Query history length is set from within Page Related Settings which found by clicking on the gear wheel at the top right of screen.
This is correct for PHP version 4.5.1-1
You just need to click on console at the bottom of the screen in phpMyAdmin and you will get the Executed history:
To view the past queries simply run this query in phpMyAdmin.
SELECT * FROM `mysql`.`general_log`
if it is not enabled, run the following two queries before running it.
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
I don't think phpMyAdmin lets you do that, but I'd like to hear I'm wrong.
On the other hand you can enable query logging in MySQL: The General Query Log
Yes, you can log queries to a special phpMyAdmin DB table.
See SQL_history.
I am using phpMyAdmin Server version: 5.1.41.
It offers possibility for view sql history through phpmyadmin.pma_history table.
You can search your query in this table.
pma_history table has below structure:
You have to click on query window just below the phpMyAdmin logo, a new window will open.
Just click on SQL History tab. There you can see history of SQL Queries.
OK so I know I'm a little late and some of the above answers are great stuff.
As little extra though, while in any PHPMyAdmin page:
Click SQL tab
Click 'Get auto saved query'
this will then show your last entered query.
I may be wrong, but I believe I've seen a list of previous SQL queries in the session file for phpmyadmin sessions
Here is a trick that some may find useful:
For Select queries (only), you can create Views, especially where you find yourself running the same select queries over and over e.g. in production support scenarios.
The main advantages of creating Views are:
they are resident within the database and therefore permanent
they can be shared across sessions and users
they provide all the usual benefits of working with tables
they can be queried further, just like tables e.g. to filter down the results further
as they are stored as queries under the hood, they do not add any overheads.
You can create a view easily by simply clicking the "Create view" link at the bottom of the results table display.
you can run your past mysql with run /PATH_PAST_MYSQL/bin/mysqld.exe
it run your last mysql and you can see it in phpmyadmin and other section of your system.
notice: stop your current mysql version.
S F My English.
why dont you use export, then click 'Custom - display all possible options' radio button, then choose your database, then go to Output and choose 'View output as text' just scroll down and Go. Voila!
There is a tool called Adminer which is capable of doing all phpmyadmin job packed in single tiny php file.
http://www.techinfobit.com/how-to-import-export-database-without-any-extra-installation/