匯入MySQL測試資料庫employee報錯

來源:互聯網
上載者:User

標籤:employees   mysql版本升級   engine   下載   .com   bz2   ora   升級   版本升級   

匯入MySQL測試資料庫employee報錯

:https://launchpad.net/test-db/

上傳解壓:

[[email protected] ~]# tar xf employees_db-full-1.0.6.tar.bz2

 

[[email protected] ~]# cd employees_db

使用mysql命令列工具,匯入建庫建表語句和資料 

employee.sql中是建庫建表語句,預設使用的是InnoDB引擎,可以自行修改

 

[[email protected] employees_db]# mysql -uroot -p123456 -t < employees.sql    #這裡會報錯:

ERROR 1193 (HY000) atline38: Unknown systemvariable‘storage_engine‘

這是因為下載的資料沒有跟著mysql版本升級改變,mysql5.7.5以後,這個變數被移除了,改用default_storage_engine就可以了,修改如下:

set default_storage_engine = InnoDB;

-- set storage_engine = MyISAM;

-- set storage_engine = Falcon;

-- set storage_engine = PBXT;

-- set storage_engine = Maria;

 

select CONCAT(‘storage engine: ‘, @@default_storage_engine) as INFO;

 

[[email protected] employees_db]# mysql -uroot -p123456 -t < employees.sql

匯入MySQL測試資料庫employee報錯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.