Tuesday, 25 July 2017

MySQL User defined variables and System variables defined variables

MySQL User defined  variables and System variables

Question: What are User-Defined Variables in MySQL?
User-Defined variables are variable that defined by user as per there need. Once they exit from the console, will be removed automatically.


Question: How to set User-Defined Variables in MySQL?
set @name="this is new variable";



Question: How to get User-Defined Variables in MySQL?
select @name;



Question: Can we define multiple variable in single line?
Yes, We can.
set @num1=10, @num2=20, @num3=30;



Question: Can we do arithmetic operators on variable?
Yes, we can do.
select @num1+@num2+@num3; //60
select @num1+@num2+@num3; //6000



Question: Is user defined variable are permanent?
No, It will be removed once close the session.


Question: Can we use user variable with Query?
Yes, If you have defined in same session, then you can use.


Question: What are System Variables?
System Variables explains how your MySQL server are configured and you can change as per your requirement.


Question: How to get the value from system variable?
select @@max_connections; //100



Question: How to update the value from system variable globally?
set @@global.max_connections=200;

set GLOBAL @@max_connections=200;

Monday, 24 July 2017

Heroku tutorial - Basic understanding

Heroku  tutorial - Basic understanding

Question: What is Heroku?
Heroku is a cloud "platform as a service (PaaS)" supporting several programming languages that is used as a web application.


Question: Can we deploy the PHP Project in Heroku?
Yes, you can do. You can even deploy Java, nodeJs, Python and Go project also.


Question: What other programming language it support?
Ruby programming
Java 
Node.js
Scala
Clojure
Python
PHP
Go


Question:How many Apps created on Heroku?
13 million.


Question:How many services Heroku have?
150+ Add-on Services


Question: Is Heroku secure?
Yes, It is.


Question: What Heroku does?
Heroku is a platform for data as well as apps - providing a secure, scalable database-as-a-service.
It is million of developers tools like database followers, forking, dataclips and automated health checks.

Question: What is offical website of heroku?
https://www.heroku.com/


Question: What are the steps to configure PHP Project?
  1. Introduction: Installed PHP, composer locally.
  2. Set up: a) Download the heroku CLI.
    b) Installed the CLI with Git.
    c) Login with heroku account.
  3. Prepare the app
  4. Deploy the app
  5. View logs
  6. Define a Procfile
  7. Scale the app
  8. Declare app dependencies
  9. Push local changes
  10. Provision add-ons
  11. Start an interactive shell
  12. Define config vars
  13. Provision a database