How to execute .sql files to create new tables(如何执行 .sql 文件以创建新表)
问题描述
phpMyAdmin 配置存储 (phpMyAdmin/doc/html/setup.html#linked-tables) 说
phpMyAdmin configuration storage (phpMyAdmin/doc/html/setup.html#linked-tables) says
[..] 然后通过导入 examples/create_tables.sql 来创建新表
[..] and then create new tables by importing examples/create_tables.sql
这不是明确的.我在哪里导入"这个文件?它是我必须执行的 SQL 脚本吗?如何?这些表将在哪里创建?
This is not explicit. Where do I 'import' this file? Is it an SQL script I have to execute? how? Where will these tables be created?
推荐答案
打开命令行;cd
到包含 mysql
可执行文件的目录;输入 mysql
并登录到您的服务器,然后选择一个数据库.
Open the command line;cd
to the directory that contains the mysql
executable; type mysql
and log into the your server, then choose a database.
现在你可以输入source/path/to/my/sql/file.sql
这篇关于如何执行 .sql 文件以创建新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何执行 .sql 文件以创建新表


- 在SQL中,如何为每个组选择前2行 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- SQL 临时表问题 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01