Archive for the ‘Beginner’ Category

Many out there will have different ideas about this, some using procs, some using a function, others using a shell script. Well I didn’t want to spend much time on it so decided a group_concat(concat would be enough. There is no genius, rather laziness :) but what if you have a hundred databases and you [...]

select *,colname | select colname,* that is the question

Posted: 28th October 2010 by Darren Cassar in Beginner, MySQL

Strangely enough, select *,colname from tbname; works just fine, whereas select colname,* from tbname; fails! So if you would like to see all columns, but have one or more of them displayed to the left of the set, you have only one way left to do it ‘comfortably’: select colname,tbname.* from tbname; well two really [...]

I want to highlight the importance of reviewing mysql’s initial set of accounts. Say you have a mysql on abc.def.ghi.jkl running on port 3306 anonymous account with privileges without a password, then: 1. mysql (if issued on localhost) 2. mysql -h abc.def.ghi.jkl 3. mysql -u ” -h abc.def.ghi.jkl 4. mysql -u ” -h abc.def.ghi.jkl -P [...]

I am publishing my MySQL related bookmark collection http://www.mysqlpreacher.com/bookmarks/. Feel free to send me links you think might be good to add in order to help others. Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back? Cheers, Darren