PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, March 15, 2022

[FIXED] Viewing a binary file in mysql on my LAMP command line server scrambles my characters

 March 15, 2022     character, lamp, mysql     No comments   

Issue

Alright, I'm lost on this one.

I have a sql database on a LAMP server. On that server is a single database called frame and a single table called frame_info with three columns, frame_data(a BLOB), frame_name(varchar), and surgeon_name(varchar). I am adding the binary data through a rather convoluted path, so I wanted to look at the binary data to make sure it arrived intact (I know visually inspecting binary data can be very misleading, I just wanted to take a look). When I get on to look at my BLOB, I do:

mysql> use frame;
mysql> select frame_name from frame_info;

=========

frame_name

=========

frame 1

=========

(looks good)

mysql>select frame_data from frame_info;

the screen displays a bunch of binary data, then should say mysql> _. Instead, all of my characters have been scrambled. This is what selecting the frame_name looks like now: attacked

This is the case for my entire machine. If I use quit to get out of mysql, the rest of my LAMP server uses the same character setup.

How does viewing a file change my entire character profile? How can I fix it?

Thanks in advance!


Solution

You're probably running into an issue whereby the binary data has a sequence that your terminal has interpreted as an ANSI terminal code, which your terminal does its best to obey.

After you exit mysql, try the reset command to restore your terminal.

You'll probably have more luck using something like MySQL Workbench when viewing binary data.



Answered By - dpw
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing