MySQL Workbench shows results as BLOB
Background:
This problem occurs when the binary string values (BINARY/VARBINARY type) are returned in the results. The binary strings contain the zero bytes and for some reason, apparently security, have not been shown by default. More details about binary strings here.
Even in the reported example SELECT INET_NTOA(167773449)
, the function returns binary string. Check this for reference.
Solution:
Since MySQL Workbench v5.2.22, it can be set through preferences whether to SHOW or HIDE such values.
- In MySQL Workbench, go to: "Edit -> Preferences... -> SQL Queries" OR "Edit -> Preferences... -> SQL Editor -> SQL Execution" (depending upon what version of Workbench you have).
- Check the option 'Treat BINARY/VARBINARY as nonbinary character string' to show the actual value.
Reference:
The original issue has been reported and answered with fix here.
How to retrieve a stored image in MySQL Workbench
You can embed image data just like any data in a MySQL table. For binary data you usually would use a BLOB column data type. MySQL Workbench has a built-in editor for binary data, which you can open via the result grid context menu:
This editor allows to view text, hex binary values and images (limited to those formats the platform can show, e.g. on Windows bmp, gif, png, jpg and a few more).
What is "[BLOB - ...]" shown in SQL database column?
Click on Options, tick "Show BLOB contents" and click on Go.
Related Topics
Better Techniques for Trimming Leading Zeros in SQL Server
Check If a Column Contains Text Using SQL
Checking If a SQL Server Login Already Exists
Wamp Server Error [Local Server - 2 of 3 Services Running]
Postgresql Delete Multiple Rows from Multiple Tables
Multiplying Two Columns in SQL Server
Mysql - Move Rows from One Table to Another
How to Select Rows With Only Numeric Characters in Oracle SQL
Check If a Time Is Between Two Times (Time Datatype)
How to Use Json_Extract in MySQL and Get a String Without the Quotes
How to Include Results of SQL Count If Count=0
Storing Image in Database Directly or as Base64 Data
Select Distinct Values from One Table and Join With Another Table
How to Pass Multiple Values to Single Parameter in Stored Procedure
Sql Take Just the Numeric Values from a Varchar
Combine Multiple Columns from Database into One Column
Alternative to Row_Number() to Get Row Position
Select All Rows With the Same Value in Column 1 But Different Values in Columns 2 and 3 Using SQL