Skip to main content

Posts

Showing posts from February, 2023

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  ...