標籤:折騰了兩晚,先對mysql基本安裝和安裝目錄結構有所瞭解。MySQL一般3種模式安裝:RPM,二進位,源碼最簡單的就是RPM安裝模式,預設自動設定好了。當前就用最簡單的安裝方式吧。安裝:MYSQL官方各種安裝方法:http://dev.mysql.com/doc/refman/5.6/en/linux-installation.html查看mysql是否安裝:rpm -qa|grep-i mysql查看yum提供的mysql版本:yum list |
標籤:跨伺服器mysql訪問, iptables配置 1> 設定被訪問機器的mysql許可權 grant all privileges on *.* to [email protected]"[ip]" identified by "[pass]" with grant option; // 授權, 可以根據情況設定不同許可權, 本sql賦予遠程機器所有mysql操作許可權 flush privileges; // 重新整理許可權
標籤:mysql這是我個人藉助網路文章學習MYSQL的過程筆記,希望對大家的有所協助。 1、DEFUALT關鍵字CREATE TABLE emp(id INT DEFAULT 12)2、設定自增長列(auto_increment)create table temp2( id INT primary KEY auto_increment, tname INT)mysql的自增長列是不能設定步長的。 查看系統當前預設的自增列種子值和步長值SHOW GLOBAL VARIABLES
標籤:Mysql查看資料庫物件(SQL命令總結)資料的對象包括表,視圖,觸發器,等等(查看統計資訊的必須進入information_schema 資料庫)舉例查看錶相關的資訊,步驟如下1、使用information_schema 資料庫use information_schema; 2、查詢所有資料的大小(MB):select concat(round(sum(data_length/1024/1024),2),'MB') as data_size from
標籤:1.建立資料庫create database test ;2. 建立表create table student (id int , name char(8) , sex char(4));—建立了一個student表,有id name sex 三個欄位3. 查看資料表欄位select columns from student ; show create table student ;describe student ;use
標籤:在操作MYSQL中注意兩個概念:幹什麼都記得 flush privileges;grant all on *.* to [email protected]‘localhost‘ identified by ‘password‘ WITH GRANT OPTION 記得要加WITH GRANT OPTION=========================2,RDS MySQL