Skip to main content

Posts

Create backup and restore databases in mariaDB

=========backup and restore mariaDB databases.=========== Step1: Go to the location where you want to store database backup now i'm creating backup of rbs database. -mysqlidump -u root -p rbs > rbsbak.sql check last lines of DB file to verify the file contains query lines.  -tail -n 10 brainwifibak.sql Step2: delete database Step3:  Restore the backup database  go to location where backup database file is placed.  -mysql -u root -p -h localhost rbs < rbsbak.sql Step 4: Create user with same privileges as super-user GRANT ALL PRIVILEGES ON *.* TO 'tolkien'@'%'; ==================create user in mariaDB===================== Step1: Create new user  -CREATE USER 'root'@'localhost' IDENTIFIED BY 'Pakistan2'; Step2: Grant all privileges to root user to he can access all databases.  -GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1'; Step3: Grant permissionfor only one database Grant all privileges to  ...

Install MariaDB 10.6 on Oracle Linux 8|Rocky Linux 8

  Install MariaDB 10.6 on Oracle Linux 8|Rocky Linux 8 How can I quickly install MariaDB 10.6 on Oracle Linux 8 / Rocky Linux 8?. MariaDB is a free and open-source relational database management system forked from MySQL and community-developed. The database software is released under the GNU General Public License. Our short tutorial will teach you how to install and configure MariaDB 10.6 on Oracle Linux 8 | Rocky Linux 8 Linux system. Install MariaDB 10.6 on Oracle Linux 8|Rocky Linux 8 You should have a running Oracle / Rocky Linux server before you start the installation. This can be a physical server, virtual machine running on VMware, KVM, OpenStack or cloud provider such as AWS. A user that has sudo privileges is also required for the installation. Step 1: Update System Run the command below to pull the latest packages of the applications installed in your system. $ sudo dnf update Transaction Summary =========================================================================...

Change public url to domain url in production mode for laravel project

 Reference links 1. https://stackoverflow.com/questions/28364496/laravel-5-remove-public-from-url/54275198#54275198 2. https://devops.ionos.com/tutorials/how-to-set-up-ip-and-port-based-virtual-hosting-vhosts-with-apache-web-server-on-centos-7.html 3. help full video  https://www.youtube.com/watch?v=XZAF5yR-WYQ step 1 Go to  cd /etc/httpd/conf vim httpd add  ip entry your-ip:80 :wq save n close step 2 Go to cd /etc/httpd/conf.d vim bsms.conf wrote host entry as shown in video Step 3 add host entru with domain ip in hosts file vim /etc/hosts your-ip <space> domain.com Step 4 Restart the httpd systemctl restart httpd  

Store all rasposes in json format in DB

Create table with name test_logs with column name as id, logs. set id to auto-increment and logs with longtext. // add DB class at top of the class. use DB;  $d = json_encode($this->data);         DB::connection('logs')->table('test_logs')->insert([             'logs'=>$d  ]);

Linux directory system

1:  I/usr The /usr mean in Linux is nothing but a directory which usually called as "User Programs". It comprises with several sub-directories and that contains binary files, lib files, doc files and the source code. /usr/bin which contains all the binary files for the user related programs. In some distors we cannot find the root directory of bin which is usually comes under "/bin", hence you can look into the /usr/bin. Eg: at, curl, dd, df ,etc /usr/sbin which also contains the binary file for the Administrators. Means for any system related commands can be find under this directory. Eg: fdisk, cron, ip6tables, lsmod , etc. /usr/lib which contains all the libraries for the /usr/bin and /usr/sbin /usr/local which contains the users related programs, which means when you install anything from the source it may goes directly to the /usr/local/xxxx 2:  /var https://www.javatpoint.com/linux-fhs-variable-directory#:~:text=Variable%20Directory%20(%2Fvar),spool%20files%20...