DEV Community

sadasdkjoiwck
sadasdkjoiwck

Posted on

export and import mariadb database

sudo mysql -u root -p

use mysql;

select user, password from user;

show databases;

exit;

sudo mysqldump -u wpadmin -p wordpress > /home/ubuntu/try.sql

head -n 5 try.sql

ll -sha

sudo mysql -u root -p

create database new_database;

exit;

sudo mysql -u root -p new_database < try.sql

sudo mysql -u root -p

show databases;

use new_database;

show tables;

describe wp_users;

select user_login, user_pass, user_email from wp_users;

exit;

Top comments (0)