Command line instructions to create a database in MySQL

$ mysql -u ”adminusername” -p


  1. mysql> CREATE DATABASE ”databasename”;
  2. mysql>
    grant all privileges on db_name.* to 'db_user'@'localhost' identified by 'db_password';
    
  3. mysql> FLUSH PRIVILEGES;
  4. mysql> EXIT

Report this snippet   Continue reading

How to Find Files and Folders in Linux Using the Command Line

Using the Find Command

The “find” command allows you to search for files for which you know the approximate filenames. The simplest form of the command searches for files in the current directory and recursively through its subdirectories that match the supplied search criteria. You can search for files by name, owner, group, type, permissions, date, and other criteria.

Typing the following command at the prompt lists all files found in the current directory.

find .

The dot after “find” indicates the current directory. Continue reading

How to make a Cat 5 / ethernet / RJ45 / network cable

Modern homes need cat 5 cable (a.k.a. ethernet cable, network cable or RJ45) running all over the place. Home networks, security cameras, telephones and even HDMI devices—among other products—can use cat 5 to transmit their data. (In my file-transfer tests, wired ethernet over cat 5 is still about 20 times faster than a wireless network.)

When my house was built in 1913, the builders didn’t have the foresight to run cat 5 everywhere. So, last night, I had to run some more, and I realized that even a lot of tech-friendly people don’t know how easy it is to make your own cat 5 cables. If you’re going to run a lot of cat 5, making your own is about a tenth of the cost of buying pre-crimped cables. And, it only takes a minute or two for each cable.

This article shows you how to get the few pieces of equipment you’ll need, and breaks it down into a simple three-step process.

Continue reading

Linux Command To Find the System Configuration And Hardware Information

On Linux based system most of the hardware information can be extracted from /proc file system, for example display CPU and Memory information, enter:

cat /proc/meminfo
cat /proc/cpuinfo

The following list summarizes commands to get various hardware from the system:

Linux cpu/hardware information

Use any one of the following command:
# less /proc/cpuinfo
OR
# lscpu
Sample outputs:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 45
Stepping:              7
CPU MHz:               1999.874
BogoMIPS:              4000.99
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0-7,16-23
NUMA node1 CPU(s):     8-15,24-31

Continue reading