我被告知这是MariaDB数据库的转储。该文件如下所示:
-- --------------------------------------------------------
-- Host: X
-- Server version: X
-- Server OS: X
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping data for table table.mctable: ~42.420 rows (approximately)
/*!40000 ALTER TABLE `mctable` DISABLE KEYS */;
INSERT INTO `mctable` (`created`, `dev`, `no`, `lbl`) VALUES
('string', 42, 42, 'string'),
.
.
.
/*!40000 ALTER TABLE `mctable` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
是因为此文件缺少某些内容?有什么办法可以将值导入数据框或其他内容?与他们一起工作时,我真的不需要将它们存储在数据库中。
共享转储缺少表架构,如果要将其导入到远程数据库,则需要首先创建数据库和表架构。
CREATE DATABASE Billing;
CREATE TABLE Customer (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL
)