標籤:centos mysql 最佳化 第十三節課 MySQL索引主索引值不能重複,也不能是NULLunique key + not null 業務主鍵用唯一索引代替案例:某InnoDB表,沒有自增列主鍵,使用一段時間後,產生片段,重整資料表空間後,從13G變成了9G重整資料表空間的3種方法alter table xx engine=innodb;optimize table xx;create primary key on id
標籤:當我們遇到mysql亂碼問題的時候,一般要修改my.ini檔案; 我遇到的是兩個版本,一個是mysql5.5版本,另一個是mysql5.75.5的是在這個目錄下面:C:\Program Files\MySQL\MySQL Server 5.55.7的是在這個目錄下面:C:\ProgramData\MySQL\MySQL Server
標籤:警告資訊是“mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead……\ThinkPHP\Library\Think\Db\Driver\Mysql.class.php 第 52
標籤:mysql;大小use information_schema;查詢所有資料的大小:select concat(round(sum(data_length/1024/1024),2),‘MB‘) as data from tables;查看指定資料庫的大小:select concat(round(sum(data_length/1024/1024),2),‘MB‘) as data from tables where
標籤:關鍵字進入mysql:mysql -uroot -p查看資料庫:show databases進入資料庫:use DATABASE‘S_NAME查看資料庫中表:show tables以上在doc下示範,以後的在工具中示範 mysql中大小寫不敏感 建立庫:create database if not exists DATABASE‘S_NAME建立表:create table if not exists TABLE‘S_NAME(列名1
標籤:啟動mysql 報錯:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111)1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已經啟動.另外看看是不是許可權問題.2、確定你的mysql.sock是不是在那個位置,mysql -u