天天看點

MySQL集錦

  • 登入指令:

    mysql -u root -padmin;

  • 檢視系統變量:

    show variables like '%dir%';

  • java異常:

    No suitable driver found for jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8

    檢查項目運作時需要的庫中是否包含了mysql的jdbc驅動jar包

    InvalidConnectionAttributeException: The server time zone value

    在配置jdbc的url時,添加時區參數:jdbc:mysql://localhost:3306/how2java?characterEncoding=UTF-8&serverTimezone=UTC