Click Technology

Linux, Windows, Mac it's all good
Browsing Linux Tips

MySQL Table Data Copy

June4

To copy data and a table structure in the same database, say to backup a table, here’s the code…

First, connect onto MySQL – this assumes of course that your mySQL serve allows connections etc., root logon to the db and so on. Typically to localhost, it does.

mysql -h localhost -u root -p

Pump in the password to the root account.

To see all your databases use…

mysql> show databases;

To use one of those databases, use…

mysql> use the_name_of_the_database;

You should get the ‘database changed’ message.

to see the tables in the database, use…

mysql> show tables;

Now you can back up a table if you like…

mysql> CREATE TABLE new_tbl SELECT * FROM original_tbl;

Simple as.

posted under Linux Tips | No Comments »

How can I secure my Linux box?

May11

This is a long and detailed topic, and there’s plenty to read on the interweb, but you should definitely consider items such as….

which dynamically update your firewall rules when your machine is attacked amongst other features.

For hardening, try Bastille Linux.  RTFM first, as this could be problematic if you screw up.

posted under Linux Tips | No Comments »

How do I tell what version of Linux I’m running?

May5

Good question, and an annoying one as I can never remember the command. It is..

lsb_release -a

Sweet!

posted under Linux Tips | No Comments »

What hardware do I have?

April23

You need to know what hardware you’ve got in your Linux box?

Easy..

sudo lshw

Job done.

posted under Linux Tips | No Comments »

mp3, Sound Juicer and all that…

April8

One of the annoying things about MP3 apps on Linux is that, given it’s the most popular ripping format in the world (prolly), I can’t see why Linux tends not to include it as a default sound format.

I think the reason is summat to do with copyright or something? Anyway, whatever.

The solution to get MP3 support into your machine is to open a terminal and issue this command..

sudo apt-get install gstreamer0.10-plugins-ugly-multiverse

Once installed, the MP3 option in applications appears so Sound Juicer / Rhythmbox suddenly have MP3 available – sweet!

posted under Linux Tips | No Comments »

Mail Ports

April6

Network ports used in conjunction with IP addresses are used to define the TCPIP socket for network connections between hosts on an (inter)network so they can communicate with each other. Some port numbers are classics and here are those used for electronic mail.

POP3 – port 110

IMAP – port 143

SMTP – port 25

HTTP – port 80

Secure SMTP (SSMTP) – port 465

Secure IMAP (IMAP4-SSL) – port 585

IMAP4 over SSL (IMAPS) – port 993

Secure POP3 (SSL-POP) – port 995

posted under Linux Tips | No Comments »
« Older EntriesNewer Entries »

This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.