Skip to main content

Posts

Showing posts from 2024

Connect MYSQL server using local system Remotely

1. Allow Remote Access in MySQL Configuration on ubuntu or your server sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf bind-address = 127.0.0.1 bind-address = 0.0.0.0 sudo systemctl restart mysql 2. Grant Remote Access Privileges to Your IP Log into MySQL on the server: and run  sudo mysql -u root -p sudo ufw allow 3306 sudo ufw status Double-check User Access Log in to MySQL on your Ubuntu server: mysql -u root -p Run the following queries to ensure the user and permissions are correct: Check Existing Users SELECT user , host FROM mysql.user WHERE user = 'root' ; here 106.219.87.127 is your public ip ( or you Local network's public IP ) GRANT ALL PRIVILEGES ON *.* TO 'root'@'106.219.87.127' IDENTIFIED BY 'Kil@123456' WITH GRANT OPTION; FLUSH PRIVILEGES; exit from mysql sudo systemctl restart mysql now on your local system run command on the location of cmd where mysql folder is present here (82.112.230.00 is server IP ) mysql -u r...

GitHub Repo Collaboration Work on single project

 =============================================== To collaborate effectively with your friend on the same project, you should use Git branches to manage different lines of development. Here's a step-by-step procedure you can follow to streamline collaboration: 1. Create Separate Branches for Each Developer Create a New Branch for Your Friend: On your local repository, create a new branch for your friend. For example if your friend name is kilvish , if you want to create a branch named kilvish , you would run: make sure you would be on main branch already   command->  git checkout -b kilvish git push origin kilvish 2. Set Up Your Friend’s Environment( On your Friend's System )  at kilvish side  run ->  Clone the Repository (if not already done): If your friend hasn’t cloned the repository yet, they should do so: command ->  git clone https://github.com/Vasu-Birla/your-repo.git   // your your main clone line  Fetch All Bran...

How to create build of Your React App and server it for Forever using PM 2

Solution 1: Use Node.js's native import with pm2 You can directly use the native node command with pm2 to run the serve command. Here's how: Install serve as a local dependency if you haven't already: bash npm install serve Start the app using pm2 with node and serve : bash pm2 start "node --no-warnings --experimental-json-modules ./node_modules/.bin/serve" --name "react-app" -- -s build Solution 2: Use a serve script in package.json Another approach is to create a script in your package.json to run serve , and then use pm2 to start that script: Add a script to package.json : ( package.json of frontend folder ) { "scripts" : { "start:serve" : "serve -s build" } } Use pm2 to run the script : pm2 start npm --name "react-app" -- run start:serve Solution 3: Using a custom script with pm2 If you want to avoid npm scripts, you can create a custom Node.js script to run serve using ES Module...

How to Create PhpMyAdmin for AWS Linux of Ubuntu Server

/============================================================================================================================================= ANother way   setting up phpMyAdmin on Ubuntu Server 22.04. Let's go step by step to get phpMyAdmin working correctly for you: Download phpMyAdmin : First, ensure that you have phpMyAdmin installed on your server. You can download it using the following command: bash Copy code sudo apt update sudo apt install phpmyadmin During the installation, you will be asked to choose a web server. Select apache2 using the arrow keys and press Enter. Now after this the most important work is to set it on URL for example on server's root URL or IP if you have already deployed any python or node project and you want to access phpmyadmin outsite of that Document Root then you have to use Allias for example your server url is 195.35.23.26 and you want to access it on http://195.35.23.26/phpmyadmin/ then you have to make changes in your default...