the below command will open up the 9100 port.
sudo iptables -I INPUT -p tcp --dport 9100 -jACCEPT
This wont work with AWS
the below command will open up the 9100 port.
sudo iptables -I INPUT -p tcp --dport 9100 -jACCEPT
This wont work with AWS
create dump files
mysqldump -u root -p test_arun > /home/user/Desktop/test_arun_dump.sql
Restore dump files
mysql -u root -p test_arun_restored < test_arun_dump.sql
for this, we need to create the database "test_arun_restored" prior to to the ececution of the command
#!/bin/bash | |
if [ -z $1 ] ; then | |
echo "Please enter hostname" | |
exit | |
fi | |
hostname=$1 | |
curl -XDELETE "http://$hostname:9200/suggest-simple" |
#!/bin/bash | |
if [ -z $1 ] ; then | |
echo "Please enter hostname" | |
exit | |
fi | |
hostname=$1 | |
curl -XDELETE "http://$hostname:9175/pdf-attachment-04" |
#To know the ports and process utilisations | |
sudo netstat -ntlp |
#ZIP a folder zip -r new-name.zip folderName
show the tables inside a database show tables;
create a table create table TableName(columndetails) eg: create table EmployeeDetails (PersonID int, LastName varchar(255), FirstName varchar(255), City varchar(255));
insert data to a table INSERT INTO EmployeeDetails (PersonID, LastName, FirstName, City) VALUES ('4005','Kallis','Jaques','Cape Town');
list all databases in database | |
show databases; | |
create a database | |
create databaseName |
start mysql in ubuntu mysql -u root -p (after entering this, we will be asked password. For office system it is "factweavers")