Time of Update: 2015-11-01
標籤:mysql sysbench一、安裝sysbench1.軟體版本sysbench-0.4.12.72.編譯安裝1)編譯配置# ./configure --with-mysql-includes=/opt/mysql/include/ --with-mysql-libs=/opt/mysql/lib/2)編譯#make......../bin/sh ../libtool --tag=CC --mode=link gcc -pthread -g -O2
Time of Update: 2015-11-02
標籤:Linux系統:linux下,MySQL預設的資料文檔儲存目錄為/var/lib/mysql。假如要把MySQL目錄移到/home/data下需要進行下面幾步: 1、home目錄下建立data目錄 cd /home mkdir data 2、把MySQL服務進程停掉: mysqladmin -u root -p shutdown 3、把/var/lib/mysql整個目錄移到/home/data mv
Time of Update: 2015-11-01
標籤: 很久以前搭建過MySQL多執行個體,記得當時很順利,呵呵!今天公司因為業務需要,我再一次搭建多執行個體.安裝完MySQL後,初始化兩個執行個體時,出現如下報錯: 150915 1:10:36 [ERROR] COLLATION ‘utf8_general_ci‘ is not valid for CHARACTER SET
Time of Update: 2015-11-02
標籤: 分類: MySQL技術2013-09-08 20:17 7350人閱讀 評論(0) 收藏 舉報 命令列模式MYSQL匯入匯出.sql檔案方法
Time of Update: 2015-11-01
標籤: 1、計算距離的公式比較長(網上尋找),建一個mysql函數: delimiter $$CREATE FUNCTION FUN_JW_DIST(lng1 double(15,9), lat1 double(15, 9), lng2 double(15,9), lat2 double(15,9)) RETURNS double(15,9)BEGIN DECLARE dist double(15, 9); SET dist =
Time of Update: 2015-11-02
標籤:主要參考了下面兩篇文章http://forum.ubuntu.org.cn/viewtopic.php?t=330121http://www.linuxidc.com/Linux/2011-09/42290.htm 1、去mysql官網下載最新的源碼,下載頁下拉式功能表選Source Code->Generic Linux ????.tar.gz2、更新系統必備的工具 [plain] view
Time of Update: 2015-11-02
標籤:之前我一直用Seconds_behind_master來衡量主從的延遲,今天看到文檔,才覺得多麼不可靠!以下是官方文檔的描述:In essence, this field measures the time difference in seconds between the slave SQL thread and the slave I/O thread.也就是說,這個變數是描述的是從庫上I/O thread和SQL
Time of Update: 2015-10-31
標籤:(1) 最簡單的修改方法,就是修改mysql的my.ini檔案中的字元集索引值,ubuntu下mysql的設定檔是在 /etc/mysql/my.cnf下,我是將這個檔案複製到我的 /home/username檔案夾下,重新命名為 .my.cnf,這樣即使配置出錯,也不會影響資料庫的正常運行如: [client] default-character-set = utf8 [mysqld] character_set_server =
Time of Update: 2015-11-02
標籤:參考:http://www.blogjava.net/amigoxie/archive/2013/02/22/395605.htmlhttp://bbs.aliyun.com/read/177043.html?spm=5176.7189909.0.0.ZiC5I81, 線上下載mysql wget –c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.10-1.rhel5
Time of Update: 2015-11-02
標籤:mysql根據設定檔會限制server接受的資料包大小。有時候大的插入和更新會受max_allowed_packet 參數限制,導致寫入或者更新失敗。查看目前配置show VARIABLES like ‘%max_allowed_packet%‘;顯示的結果為:+--------------------+---------+| Variable_name | Value |+----------------
Time of Update: 2015-10-31
標籤:今天發現Navicat for MySQL有LINUX版本了哈, 開心的說,首先上官網上下載LINUX版本: http://www.navicat.com/download1. 下載 navicat110_mysql_en.tar.gz 檔案 2. 下載後解壓tar檔案tar -zxvf /home/rain/download/navicat8_mysql_en.tar.gz 3. 解壓後
Time of Update: 2015-11-02
標籤:第十章 MySQL 常用函數第一節:日期和時間函數1,CURDATE() 返回當前日期;2,CURTIME() 返回目前時間;3,MONTH(d) 返回日期 d 中的月份值,範圍是 1~12第二節:字串函數1,CHAR_LENGTH(s) 計算字串 s 的字元數;2,UPPER(s) 把所有字母變成大寫字母;3,LOWER(s) 把所有字母變成小寫字母;第三節:數學函數1,A BS(x) 求絕對值2,SQRT(x) 求平方根3,MOD(x,y)
Time of Update: 2015-11-02
標籤:php操作mysql650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/75/55/wKiom1Y20huyVfqoAAFx8Sg-tSU187.jpg" style="float:none;" title="psb (1)_副本.png" alt="wKiom1Y20huyVfqoAAFx8Sg-tSU187.jpg" />650) this.width=650;"
Time of Update: 2015-11-02
標籤:解決亂碼的方法,我們經常使用“set names utf8”,那麼為什麼加上這句代碼就可以解決了呢?下面跟著我一起來深入set names utf8的內部執行原理先說MySQL的字元集問題。Windows下可通過修改my.ini內的PHP代碼[mysql] default-character-set=utf8
Time of Update: 2015-11-02
標籤:當在一個UNIQUE鍵上插入包含重複值的記錄時,我們可以控制MySQL如何處理這種情況:使用IGNORE關鍵字或者ON DUPLICATE KEY
Time of Update: 2015-11-02
標籤:1. 查看該資料庫執行個體下所有庫大小,得到的結果是以MB為單位mysql> select table_schema,sum(data_length)/1024/1024 as data_length,sum(index_length)/1024/1024 as index_length,sum(data_length+index_length)/1024/1024 as sum from information_schema.tables;+--------------------
Time of Update: 2015-11-02
標籤:beans包和jdbc包代碼不放了,麻煩Service.java:package service;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.ArrayList;import java.util.List;import beans.Profit;import jdbc.JdbcConn;
Time of Update: 2015-11-02
標籤:以下全部轉載於 http://blog.csdn.net/lane_l/article/details/20235909本人於今晚按照該文章使用centos 6.7 64bit安裝成功,做個備份,就轉過來了。---------------------------------------------------------------轉載者語:轉載於:http://www.osyunwei.com/archives/2353.html原文標題:CentOS
Time of Update: 2015-11-01
標籤: 雖然經過研究發現TCMalloc不適合我們現有的遊戲架構,但意外收穫發現TCMalloc可以大幅度提高MYSQL 效能及記憶體佔用,這裡給出配置及測試的結果:1.配置 關於TCMalloc的安裝,在《Google perftools 安裝手記(TCMalloc)》 一文中已經詳細給出,下面給出將TCMalloc配置到MYSQL的步驟:1.1 修改MySQL啟動指令碼(依據MySQL安裝位置):1 vi
Time of Update: 2015-11-01
標籤:伺服器 mysql ①、擷取運行中的mysql進程使用各伺服器參數及其值MariaDB [(none)]> SHOW GLOBAL VARIABLES\G#查看伺服器全域參數MariaDB [(none)]> SHOW SESSION VARIABLES\GMariaDB [(none)]> SHOW&nb