在本教程中,将学习如何在MySQL命令行下将MySQL示例数据库导入到MySQL数据库服务器中。 在本教程之后,您将yiibaidb示例数据库导入到MySQL服务器中以实践和学习MySQL。
第一步: 从MySQL示例数据库文章中(yiibaidb),有关示例数据库的结构,请参考:
第二步: 将下载的文件解压缩到临时文件夹中。为了简单起见,我们将把它解压缩到D:worksp,如下所示 –
第三步: 连接到MySQL服务器并创建数据库
D:softwaremysql-5.7.18-winx64bin>mysql -hlocalhost -uroot -p Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 23 Server version: 5.7.9 MySQL Community Server (GPL) Copyright (c) 2000, 2017, 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 owners. Type 'help;' or 'h' for help