Wednesday, September 26, 2012

solved: Windows updats fails on brand new Lenovo X1 Carbon

So, I got Lenovo X1 carbon.  This is a fine ultrabook with 1600x900 screen, which is essential for the task I plan to use it for : programming (update: here is one of the Android game I did almost entirely on X1 carbon).  Everything went fine until I tried to update Windows.  It downloaded about 70 patches.  However, when it applied the patches, it failed, and revert back to the state before the patches were applied.

This time, reboot does not help (hey, rebooting is supposed to solve every issue, right? :)

After searching for while, I found that it is actually a known issue, and it is not specific to X1 Carbon.  The patch that failed was KB2647753.  You will have to install this patch and only this patch first and reboot the machine.  After that the rest of the patches installed just fine.

Update: if you are a Linux user, you will be glad to see that Linux is working fine on X1 Carbon.

Sunday, September 23, 2012

Create MySQL user and database

I need to create new MySQL database and a user once in a while, and and I never quite remember the exact command how to do it.

So, a note to self, this is how to do it.

$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT
By the way, this is lifted from wordpress document,