set names utf8; set global validate_password.policy=LOW;set global validate_password.length=6;CREATE DATABASE If Not Exists ai_teaching Character Set UTF8;CREATE USER 'ai'@'localhost' IDENTIFIED BY 'shixun';GRANT all ON ai_teaching.* TO 'ai'@'localho
1.进入mysql命令行窗口 mysql -uroot -p123456 2.展示所有数据库 show databases: 3.选择数据库 use 数据库名 4.展示选择的数据库中所有表 show tables: 5.导入指定的sql脚本数据 SOURCE 需要导入的脚本的绝对路径 示例:SOURCE /songwp/project/java/workreal/workereal0410.sql
[root@chavinking mysql]# scripts/mysql_install_db --user=mysqlInstalling MySQL system tables...2016-12-02 00:05:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see docume
数据库每天都想备份,手动备份太麻烦而又容易忘记,所以写了一个自动备份MySQL数据库的脚本,加入定时计划中,每天自运运行. 创建Shell脚本代码如下,命名为mysql_dump.sh #!/bin/bash if [ "$1" = "" ] then echo "database name is not set!" else id="root" #用户名 pwd="123456" #密码 db=$1 #数