#!/bin/bash # 假设将sakila数据库名改为new_sakila # MyISAM直接更改数据库目录下的文件即可 mysql -uroot -p123456 -e 'create database if not exists new_sakila' list_table=$(mysql -uroot -p123456 -Nse "select table_name from information_schema.TABLES where TABLE_SCHEMA='sakila'&
主库:192.168.1.250 从库:192.168.1.199 主库 my.ini # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # ***
create user 'wechat'@'192.168.10.%' identified by 'xxxxx'; create database 库名DEFAULT CHARSET utf8 COLLATE utf8_general_ci; grant all privileges on 库名.* to 'wechat'@'192.168.10.%' identified by 'xxxxx';
start transaction; select id,rname,free_course_ph,cmp_id,free_date_limit_ph from ebk_students WHERE cmp_id=1105 and free_course_ph>0; UPDATE ebk_students SET free_date_limit_ph=1561824000 where cmp_id=1105 and free_course_ph>0; 确认没有问题,Commit:有问题,Rol
SQL手工注入 靶机:metasploitable(低) 1.当无权读取infomation_schema库[MySQL最重要的源数据库,必须有root权限]/拒绝union.order by语句 #若不为root a.猜列名: ' and coclumn is null--+ [并且列有一个字段为空,正常执行,若没有空字段,且该列存在,返回空白内容:若列不存在,则报错](可确定语句可插入数据库运行) 例如:' and asd is null--+ 使用kali集成的字典
1.单机MySQL主机名修改 今天无事看到自己的主机名不对,于是改了一下,以便区分服务器,那只重启MySQL时出现下面错误: MySQL manager or server PID file could not be found! [FAILED]Starting MySQL.Manager of pid-file quit without updating fi[FAILED] 怎么会找不到PID呢,看下面: [root@daban114.com ~]# ps aux | gre
alter table test rename test1; --修改表名 ); --添加表列 alter table test drop column name; --删除表列 ) --修改表列类型 ) )--修改表列名 语句 set names utf8;用于设定数据库编码,让中文可以正常显示. 1.创建数据库:CREATE DATABASE `database` CHARACTER