zoukankan      html  css  js  c++  java
  • MySQL 挺有意思

    1, 修改密码

    mysql -u root -p
    
    update user set Password = PASSWORD('NEWPWD') WHERE user = 'root';
    
    FLUSH PRIVILEGES;

    2, 添加远程授权

    GRANT   ALL   PRIVILEGES   ON   *.*   TO   'root'@'%'   WITH   GRANT   OPTION;

    3, 修改编码, my.ini

    [client]
    default-character-set=utf8
    
    [mysqld]
    character-set-server=utf8
    
    [mysql]
    default-character-set=utf8

    4, 建表

    DROP TABLE IF EXISTS `casehistory`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `casehistory` (
      `id` varchar(255) NOT NULL,
      `createBy` varchar(255) DEFAULT NULL,
      `createOn` datetime DEFAULT NULL,
      `department` varchar(255) DEFAULT NULL,
      `doctorAdvice` varchar(255) DEFAULT NULL,
      `hospital` varchar(255) DEFAULT NULL,
      `hospitalizedNo` varchar(255) DEFAULT NULL,
      `inquiryOn` datetime DEFAULT NULL,
      `nextVisitOn` datetime DEFAULT NULL,
      `nextVistItem` varchar(255) DEFAULT NULL,
      `patientId` varchar(255) DEFAULT NULL,
      `situation` varchar(255) DEFAULT NULL,
      `updateBy` varchar(255) DEFAULT NULL,
      `updateOn` datetime DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
  • 相关阅读:
    C++数字与字符串相互转化
    NextDate问题
    Mac使用host屏蔽某指定网站
    Pycharm里面使用anaconda配置环境
    Logisim
    XML有关知识
    Mac环境下的Tomcat
    Allow apps downloaded from Anywhere
    寻找两数之和
    最大子序列
  • 原文地址:https://www.cnblogs.com/BenWong/p/3802655.html
Copyright © 2011-2022 走看看