如何通过导入.sql文件在xampp中创建表时修复此错误

ohfgkhjo  于 2021-07-24  发布在  Java
关注(0)|答案(1)|浏览(297)

在xampp数据库中导入sql代码文件时出现此错误。错误为:-----数据库: cywsitec_admin

2fjabf4q

2fjabf4q1#

--------表的表结构 admin --创建表 admin ( id int(255)不为空, user varchar(255)不为空, pass varchar(255)不为空,)engine=innodb default charset=latin1

下面是我的代码。请看一下并帮助我。提前谢谢。

-- phpMyAdmin SQL Dump
    -- version 4.7.7
    -- https://www.phpmyadmin.net/
    --
    -- Host: localhost
    -- Generation Time: May 25, 2018 at 12:09 PM
    -- Server version: 10.1.30-MariaDB
    -- PHP Version: 7.2.1

    SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
    SET AUTOCOMMIT = 0;
    START TRANSACTION;
    SET time_zone = "+00:00";

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8mb4 */;

    --
    -- Database: `cywsitec_admin`
    --

    -- --------------------------------------------------------

    --
    -- Table structure for table `admin`
    --

    CREATE TABLE `admin` (
      `id` int(255) NOT NULL,
      `user` varchar(255) NOT NULL,
      `pass` varchar(255) NOT NULL,
    )ENGINE=INNODB DEFAULT CHARSET=latin1;

    --
    -- Dumping data for table `admin`
    --

    INSERT INTO `admin` (`id`, `user`, `pass`) VALUES
    (1, 'admin', 'password');

    --
    -- Indexes for dumped tables
    --

    --
    -- Indexes for table `admin`
    --
    ALTER TABLE `admin`
      ADD PRIMARY KEY (`id`);

    --
    -- AUTO_INCREMENT for dumped tables
    --

    --
    -- AUTO_INCREMENT for table `users`
    --
    ALTER TABLE `admin`
      MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
    COMMIT;

    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

相关问题