*************** process to change MySql ipaddress to listen for all ip ******** -> update user set Host=”%” where User=”phpmyadmin”; -> sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf [change “bind-address = 0.0.0.0”] -> flush privilage -> check by netstat -nlp | grep 3306 [ouput should be start listen on 0.0.0.0] -> telnet 192.168.1.19 3306 [now check its connecting or not with the ip]
Year: 2019
Safest Way to Merge A Git Branch Into Master
In this article I am going to explain you about the safest way to merge a git branch(stage branch) into master branch. Git Merge :- ((git merge branch) Never forget to take a pull from your master branch after pushing your all new changes to yourcurrent git branch. If your current branch(stage branch) is up to date and now you want to merge your current branch (stage branch)with master branch then follow below process.Explore phpmypassion for more updates and Follow us on facebook progmypassion/ first checkout to master branch then…
Top Mostly Used Git Commands
************************** Git clone a Repository ****************** git clone <repository_url> ************************ Check git branch ********************* git branch ************************ Git Create Branch ************* Git checkout -b <branch-name> ************************ Checkout to another branch ************* Git checkout <branch-name> ************************ Make your file same as git repository ************* Git checkout <file-name> -> for all files :- Git checkout . ************************* Git commit command ********************* git add . [for all files] git commit -m “your comment” ************************* Git push command ********************** git push origin <your-branch-name> *********************** Git pull command ************************ git pull origin <your-branch-name> *********************** Git…
List of Top Docker Commands in Linux
Docker works just like Git. you have to always take a pull for latest image. ****************************** Docker install ****************** sudo apt-get update sudo apt-get install docker.io **************************** Check docker installed or not ************* docker ps -a ************************* Login to AWS container via command line ************ $(aws ecr get-login –no-include-email –region us-east-1) get-login [–registry-ids <value> [<value>…]] [–include-email | –no-include-email] **************************** pull the docker image ************* docker pull your-server.us-east-1.amazonaws.com/aws_repository ************************** Docker push image ************************************** -> commit your changes first docker commit <your-container-name> your-server.us-east-1.amazonaws.com/aws_repository:v2.2 (v2.2 is the tagging version) -> Now run push…
How To Remove Docker Images ?
Removing Docker Images Remove one or more specific images Use the docker images command with the -a flag to locate the ID of the images you want to remove. This will show you every image, including intermediate image layers. When you’ve located the images you want to delete, you can pass their ID or tag to docker rmi: List: docker images -a Remove: docker rmi Image Image
Difference Between DDL and DML?
DML DML statements are SQL statements that manipulate data. DML stands for Data Manipulation Language. The SQL statements that are in the DML class are INSERT, UPDATE and DELETE. Some people also lump the SELECT statement in the DML classification. DML example SQL statements are below – SELECT – retrieve data from the a database INSERT – insert data into a table UPDATE – updates existing data within a table DELETE – Delete all records from a database table MERGE – UPSERT operation (insert or update) CALL – call a…
How To Integrate Facebook PHP SDK With Laravel 5.4
In this article, I am explaining a simple process to set up the Facebook Marketing SDK using a PHP Artisan Command with Laravel 5.4. You can retrieve campaigns or ad account data by setting up a cron job with the created command or running it directly in the terminal. First, edit the composer.json file in the project’s root folder to include the Facebook SDK: { “require”: { “facebook/php-business-sdk”: “3.1.*” } } Next, run composer update in the terminal to pull the SDK into the vendor folder: php composer.phar install –no-dev…
Laravel Advanced how to pass variable into nested where function?
When using a variable inside a Closure scope, you must use the “use” keyword to pass the variable into the Closure: foreach ($user->locations as $location) { $r = TableName::where(‘id’, ‘<>’, $this->id) ->where(function ($q) use ($code) { // SEE HERE $q->where(‘name’, $code) ->orWhere(‘alias’, $code); }) ->get(); } If you have an array variable like $requestParam[‘name’], you need to define it before the query statement: $name = $requestParam[‘name’]; $lastRecordResult = YrModel::where(‘type’, self::table) ->where(function ($q) use ($name) { $q->where(‘name’, $name) ->orWhere(‘alias’, $name); }) ->where(‘t_id’, $requestParam[‘t_id’]) ->where(‘v_id’, $requestParam[‘v_id’]) ->count();
