我这里是进入到/usr/local/mysql/bin目录下进行登录mysql,也可以根据自己实际情况登录mysql,比如:mysql -uroot -p

[root@vultr bin]# ./mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.24 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE wgcloud DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)

mysql> use wgcloud;
Database changed
mysql> source /wgcloudTest/wgcloud-MySQL_v3.3.7.sql;
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)


看到都是Query OK,就是导入完成了

[root@vultr bin]# ./mysqldump -uroot -p wgcloud > /home/wgcloud.sql
Enter password: