Below is the command to add a boolean type column as default 1 to an existing table in mysql:More
The best programming blog.
Covering a wide array of programming topics.
mysql add column boolean default 0
Below is the command to add a boolean type column as default 0 to an existing table in mysql:More
mysql add column int default null
Below is the command to add a int data type column as default null to an existing table in mysql:More
mysql add column datetime default null
Below is the command to add a datetime datatype column as default null to an existing table in mysql:More
Add boolean column existing table mysql
Below is the command to add a boolean datatype column to an existing table in mysql:More
Create disk alerts Ubuntu AWS CloudWatch
Below are the steps to create disk alerts for Ubuntu instance on AWS CloudWatch: Create CloudWatch Alarm: Click Select metric button Select your agent: CWAgent in the above case, following the following blog for how to create that agent: Monitor disk usage EC2 Ubuntu instance Click “InstanceId, device, fstype, path” metric on the next screen: Select the…More
Monitor disk usage EC2 Ubuntu instance
Below are the steps to configurion AWS dashboard and Ubuntu server instanceto send disk usage metrices to AWS. Go to IAM > Roles and click Create role button: Select AWS service as Trsuted entity type, EC2 as use case and click Next button. On the next page, chose CloudWatchAgentServerPolicy policy for that role and hit…More
Where to find logs of nginx in Ubuntu
If ypu want to check the logs of nginx, want to check why your nginx service is not starting then you need to go following folder in Ubuntu: You need to check the error.log file in that folder to find the cause of issues/errors you are getting with your site or nginx service.More
Nginx bind() to 0.0.0.0:80 failed
If your nginx is failing to start on Ubuntu then you need to run the following commands to stop the apache which co=uld be consuming the 80 port. You can now start the nginx service with the help of this command: Your nginx service will start now.More
Ubuntu Disable autostart service on startup
You can run the following command to stop/disable service to autostart on start up: Example:More