phpmysql error – #1273 – #1273 – Unknown collation: ‘utf8mb4_general_ci’

This solution worked for me 1) Click the “Export” tab for the database 2) Click the “Custom” radio button 3) Go the section titled “Format-specific options” and change the dropdown for “Database system or older MySQL server to maximize output compatibility with:” from NONE to MYSQL40. 4) Scroll to the bottom and click “GO”. If … Read more

UTF8 problem with MySQL 5

Have you tried adding SET NAMES ‘utf8′; to your sql dump? The thing with utf8 or encodings in general is that in order to be successfull, you have to make sure that: the file is encoded utf8 without signature the default encoding of the mysql server is set to utf8 the connection is utf8 (that’s … Read more

Auto Increment skipping numbers?

The default auto_increment behavior in MySQL 5.1 and later will “lose” auto-increment values if the INSERT fails. That is, it increments by 1 each time, but doesn’t undo an increment if the INSERT fails. It’s uncommon to lose ~750 values but not impossible (I consulted for a site that was skipping 1500 for every INSERT … Read more

Import CSV to Update rows in table

You can use temporary table to hold the update data and then run single update statement. CREATE TEMPORARY TABLE temp_update_table (meta_key, meta_value) LOAD DATA INFILE ‘your_csv_pathname’ INTO TABLE temp_update_table FIELDS TERMINATED BY ‘;’ (meta_key, meta_value); UPDATE “table” INNER JOIN temp_update_table on temp_update_table.meta_key = “table”.meta_key SET “table”.meta_value = temp_update_table.meta_value; DROP TEMPORARY TABLE temp_update_table;

Viewing Content Of Blob In phpMyAdmin

earlier versions of phpmyadmin had a setting called $cfg[‘ShowBlob’] = TRUE; That would allow you to view the contents of blobs in the browser. You should note that this would cause chaos if you were storing binary files in blobs, since you would see endless gobblygok in the browser window. There are some people (like … Read more