shell mysql 直接创建表

shell 直接创建表


#!/bin/bash
mysql -hdatabases -uroot  -p^xxxxasdasdadd <<EOF
        Create Database If Not Exists MyDB Character Set UTF8;
        Create Table If Not Exists MyDB.MyTable(
                ID Bigint(8) unsigned Primary key Auto_Increment,
                thTime DateTime,
                name  VarChar(128)
        )Engine MyISAM


原文地址:https://www.cnblogs.com/freefei/p/7101932.html