標籤:1.找到啟動mysql用的my.cnf檔案 ubuntu-> cat /etc/init.d/mysql -> /etc/mysql/my.cnf2.在/etc/mysql/my.cnf 檔案中找到[mysqld]下面加一行skip-grant-tables作用是跳過許可權驗證的表,添加之後重啟mysql 就可以直接使用 mysql 命令登入了3. mysql 4.執行sql mysql 5.5
標籤:1. 使用者權限相關的函數. 這些函數在接下來的頁面設計中會用到. 主要包括: function user_is_login() function database_contains_author($email, $password) function get_md5_password($password) function user_has_role($role) 1.1
標籤:之前我一直用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
標籤:mysql根據設定檔會限制server接受的資料包大小。有時候大的插入和更新會受max_allowed_packet 參數限制,導致寫入或者更新失敗。查看目前配置show VARIABLES like ‘%max_allowed_packet%‘;顯示的結果為:+--------------------+---------+| Variable_name | Value |+----------------
標籤:一、建立使用者 CREATE USER ‘username‘@‘host‘ IDENTIFIED BY ‘password‘; 二、編輯許可權 GRANT ALL ON *.* TO ‘username‘.‘host‘ IDENDIFIED BY ‘password‘; #重新整理許可權 flush privileges; 三、遠端存取1、編輯mysql設定檔 vi /etc/mysql/my.cnf 注釋 bind = 12