I use magento 1.9.0.1, and I use to change the following information:
For the table sales_flat_order :
=> change customer_id from NULL to new customer_id
=> customer_is_guest to 0 .
Also for the sales_flat_order_grid table:
=> change customer_id from NULL to new customer_id
After two requests, the following task will be performed:
UPDATE sales_flat_order SET customer_id = (Your_Customer_ID), customer_is_guest=0 WHERE entity_id = Your_Order_ID_HERE AND customer_id IS NULL UPDATE sales_flat_order_grid SET customer_id = Your_Customer_ID WHERE entity_id = Your_Order_ID AND customer_id IS NULL
source share