DEV Community

loading...

export and import mariadb database

asdflkjh profile image kinaamnay ・1 min read

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;

Discussion (0)

pic
Editor guide