When you want to see which user you are and which database you're working with, put this in .my.cnf:
prompt=(\\u@\\h) [\\d]>\\_
Read More »
By
halfgaar, 10 months ago, on
April 18, 2011, at 10:04 |
Wordpress does automatic paragraph formatting using the wpautop filter, some PHP code originally developed by Matt Mullenweg. For most of the time that this blog has existed, I've disabled the wpautop filter using the following two lines in my theme's functions.php file:
Read More »
By
Rowan Rodrik, 1 year ago, on
December 09, 2010, at 00:12 |
On Oktober, the 25th, in what will be known to future generations as a historical move, Wiebe changed the A record of www.aihato.nl to point to the new production site running at Ytec. The new site, a collaboration by Ytec and me, based on WordPress, has been in development since May. At least, that's when I started taking notes. There had been some discussion, wire-framing and design done before that time.
Read More »
By
Rowan Rodrik, 1 year ago, on
November 09, 2010, at 17:11 |
Zimbra installs its own mysql and there is no workable mysqldump command. There is a mysql command wrapper script (/opt/zimbra/bin/mysql) that loads an environment to set password and such, but there is no such thing for mysqldump. I copied that wrapper script to /usr/local/bin/mysqldump so that user zimbra can no run mysqldump. This is it:
Read More »
By
halfgaar, 1 year ago, on
October 08, 2010, at 15:10 |
(source) To show one users privilges in mysql:
Read More »
By
halfgaar, 1 year ago, on
September 30, 2010, at 11:09 |
Sometimes you want automated access for root on your MySQL database. One way of accomplishing that is by doing this:
Read More »
By
halfgaar, 1 year ago, on
August 11, 2010, at 09:08 |
I often need to make a MySQL database and a user that can do anything in it:
create database bla character set utf8;
use bla
grant all on bla.* to 'jack'@'localhost' identified by 'password';
Read More »
By
halfgaar, 2 years ago, on
March 16, 2010, at 12:03 |
When you don't know the current mysql root password and you want to change it, do this:
/etc/init.d/mysql stop
mysqld --skip-grant-tables &
mysql -p
use mysql;
update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
flush privileges;
quit;
killall mysqld
/etc/init.d/mysql start
Read More »
By
halfgaar, 2 years ago, on
January 11, 2010, at 14:01 |
When you have tables with a large amounts of columns, it can be easy to show the columns vertically, as opposed to horizontally. In Postgresql, you can toggle this with \x. In MySQL it's a little bit different.
Read More »
By
halfgaar, 2 years ago, on
August 23, 2009, at 12:08 |