Wednesday, May 28, 2008
How to install TOR on CentOS
After installing privoxy and tor you must use this command in order to work properly
yum install libevent
yum install libevent
Friday, May 16, 2008
How to change the root password in Ubuntu
As default Ubuntu has no password set for the root user. To gain root access you have to type in your own user password. This is the password you set for the first user while installing Ubuntu.
To manually set a password for the root user, type in the following in the shell:
sudo passwd
After that you are asked to type in the new root password twice. Finally, your root user has its own password.
To manually set a password for the root user, type in the following in the shell:
sudo passwd
After that you are asked to type in the new root password twice. Finally, your root user has its own password.
Wednesday, May 14, 2008
MYSQL LOAD INFILE EXPORT OUTFILE
Syntax and Example
LOAD DATA LOCAL INFILE '/home/kk/EHRMSList.csv'
INTO TABLE EMP
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(SNO,EID,NAME,DEPT);
SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;
LOAD DATA LOCAL INFILE '/home/kk/EHRMSList.csv'
INTO TABLE EMP
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(SNO,EID,NAME,DEPT);
SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;
Apache2 default page configuration
Add the following in the sites available page with websites
DirectoryIndex Default.html
Of course, you can use any filename you wish. I prefer to leave Default.html as a valid index as well.
DirectoryIndex Default.html
Of course, you can use any filename you wish. I prefer to leave Default.html as a valid index as well.
Password Encryption in MySQL using MD5
Example:
CREATE TABLE Users
(
Username CHAR(15) NOT NULL,
Password CHAR(15) NOT NULL
);
INSERT INTO Users (username,password) VALUES ('name',md5('pass'));
CREATE TABLE Users
(
Username CHAR(15) NOT NULL,
Password CHAR(15) NOT NULL
);
INSERT INTO Users (username,password) VALUES ('name',md5('pass'));
Subscribe to:
Posts (Atom)