Category: MySQL

  • Dropping a table does not remove permissions granted to it in MySQL

    If: 1. A table t1 is created in database test; 2. A login is granted select permission on t1; 3. t1 is dropped and then recreated. Then that login would still be able to read the newly recreated table t1, even if t1 has totally different columns. The reason is that the table select privilege […]

  • Perl script to convert MySQL character set to utf8

    “Groovy, baby!”, as international man of mystery likes to say. It seems converting character and text data to utf8 character set is a common task for MySQL, especially during an upgrade. In fact, I had trouble with it during server and WordPress database upgrade for this blog site. I wrote about it in this post, […]

  • Get to MySQL data directory on Ubuntu

    I’ve been asked about this and realized that it may not be obvious to people who are more familiar with Windows than with Ubuntu. So here is a tip. When learning MySQL on Ubuntu, it is helpful to be able to get to MySQL’s data directory and observe file creation and modification while you are […]

  • Identify a proxy when automatic configuration script is used

    Many, if not all, corporations control and monitor employees web surfing and email activities. Sometimes a company may choose to use automatic configuration script to enable employees’ web connection. This can be verified by: Internet Explorer: Tools -> Internet Options-> LAN Settings -> “Use automatic configuration script”; Firefox 3: Tools -> Options -> Advanced -> […]

  • Interesting things about TIMESTAMP data type in MySQL

    TIMESTAMP is interesting in that it can give you an easy way of keeping track of when was the last time a row was modified, with a few caveats, listed below. The tests were run on 5.1.30-community MySQL Community Server (GPL). By default, TIMESTAMP is NOT NULL. Inserting a NULL value causes it to store […]