Skip to main content

Everything disappears when I attempt an insert.

Comments

9 comments

  • cPRex Jurassic Moderator
    Hey there! Let me see if I'm testing this right. I made a database with the following table with a Blob type: mysql> CREATE TABLE example1 (ID SMALLINT UNSIGNED, Name VARCHAR(40), Description BLOB);
    Confirmed that was created correctly: mysql> describe example1; +-------------+----------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------------------+------+-----+---------+-------+ | ID | smallint(5) unsigned | YES | | NULL | | | Name | varchar(40) | YES | | NULL | | | Description | blob | YES | | NULL | | +-------------+----------------------+------+-----+---------+-------+ 3 rows in set (0.00 sec)
    Then I went to PHPMyAdmin and tried to do an import - by just adding the number "2" to my smallint field, and that input was accepted normally. Here is the output from that through the interface: INSERT INTO `example1` (`ID`, `Name`, `Description`) VALUES ('2', NULL, NULL);
    Would you happen to have root access to the server so you could check the MySQL logs and see if there was anything reported there during the issue?
    0
  • Muscycle
    I do have such access. When I insert just one field, an ID field, it goes OK. When I attempt to enter a file name into the BLOB field using PHPMyAdmin's "choose file" button is when I get the problem. Exactly which log should I check?
    0
  • cPRex Jurassic Moderator
    Ah, I didn't try inserting into the BLOB. I created a plain txt file and inserted that, and it worked how I would expect: INSERT INTO `example1` (`ID`, `Name`, `Description`) VALUES (NULL, NULL, NULL), (NULL, NULL, 0x7b5c727466315c616e73695c616e7369637067313235325c636f636f61727466323531330a5c636f636f61746578747363616c696e67305c636f636f61706c6174666f726d307b5c666f6e7474626c5c66305c6673776973735c6663686172736574302048656c7665746963613b7d0a7b5c636f6c6f7274626c3b5c7265643235355c677265656e3235355c626c75653235353b7d0a7b5c2a5c657870616e646564636f6c6f7274626c3b3b7d0a5c6d6172676c313434305c6d61726772313434305c766965777731303830305c7669657768383430305c766965776b696e64300a5c706172645c74783732305c7478313434305c7478323136305c7478323838305c7478333630305c7478343332305c7478353034305c7478353736305c7478363438305c7478373230305c7478373932305c7478383634305c7061726469726e61747572616c5c7061727469676874656e666163746f72300a0a5c66305c66733234205c6366302072616e646f6d20746578742066696c657d);
    By default, the MySQL log is located at /var/log/mysqld.log on cPanel systems, but that can be changed in the /etc/my.cnf configuration file. So if you don't see the file in /var/log, run this to get the correct file name: grep log-error /etc/my.cnf
    0
  • Muscycle
    There is a table in the MySQL database entitled, "General Log" but it has no data. I'm not using a cPanel system (at least I don't think so).-
    0
  • cPRex Jurassic Moderator
    The log wouldn't be inside a table, but a flat file somewhere on the server. It's odd that you're not using a cPanel machine if you're asking questions here on our forum, as this is designed specifically for cPanel users. However, I'd still expect PHPMyAdmin to behave the same on a non-cPanel machine.
    0
  • Muscycle
    My apologies, I thought this was a PHPMyAdmin forum.
    0
  • Muscycle
    I found the error log. But it isn't a jpeg. I have it as a pdf. It doesn't show any errors associated with the problem I've experienced.
    0
  • cPRex Jurassic Moderator
    Unfortunately I'm not sure - it could be PHPMyAdmin itself that is causing the error, so checking the log for that tool might be a good next step. If you're using a standard installation of PHPMyAdmin, open the tool but don't select any database and look for the Binary Log tab. You can then select different logs from a dropdown list and press the GO button to view them. I'm not sure where the PHPMyAdmin log would be on your machine, but one popular location is /var/www/html/phpMyAdmin-5.0.1-all-languages/log/ so you might want to see if you have that for issues with the software itself.
    0
  • Muscycle
    Thank you very much. I appreciate your input.
    0

Please sign in to leave a comment.