sudo mysql -u root -p
SHOW databases;
+----------------------------+
| Database |
+----------------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| acarakupang |
+----------------------------+
9 rows in set (0.002 sec)
SELECT user, host, password FROM mysql.user;
+---------------------------------+----------------+-------------------------------------------+
| User | Host | Password |
+---------------------------------+----------------+-------------------------------------------+
| root | localhost | |
| acarakupang. | IP address | * |
| mariadb.sys | localhost | |
+---------------------------------+----------------+-------------------------------------------+
9 rows in set (0.001 sec)
quit
cd ~
mysqldump --opt -Q -u acarakupang -p acarakupang > ~/acarakupang.sql
exit
scp user@server:~/acarakupang.sql ~/
100% 10MB 4.8MB/s 00:02
make sure that mysql already correctly install and execute command:
sudo mysql_secure_installation
sudo mysql
create database acarakupang;
create user 'acarakupang'@'localhost' identified by 'acarakupang_password';
grant all privileges on acarakupang.* to 'acarakupang'@'localhost';
flush privileges;
quit;
mysql -u acarakupang -p acarakupang < ~/acarakupang.sql