MySQL 資料庫的啟動與關閉

來源:互聯網
上載者:User

MySQL 資料庫的啟動與關閉

MySQL資料庫伺服器通常指的的是mysqld,而命令列mysql則是mysql用戶端程式,這兩個概念通常容易混淆。通常啟動mysql伺服器即是啟動mysqld進程,mysqld啟動後,可以通過mysql串連到mysql伺服器。本文主要描述了mysql伺服器的幾種啟動方式以及如何關閉mysql伺服器。

--------------------------------------分割線 --------------------------------------

Ubuntu 14.04下安裝MySQL

《MySQL權威指南(原書第2版)》清晰中文掃描版 PDF

Ubuntu 14.04 LTS 安裝 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主從伺服器

Ubuntu 12.04 LTS 構建高可用分布式 MySQL 叢集

Ubuntu 12.04下原始碼安裝MySQL5.6以及Python-MySQLdb

MySQL-5.5.38通用二進位安裝

--------------------------------------分割線 --------------------------------------

1、直接使用mysqld啟動
  mysqld 即是mysql伺服器,可以調用該命令直接啟動mysql伺服器
  mysqld 從設定檔中讀取[mysqld]以及[server]選項組的內容,也可以通過直接在命令列跟隨參數。
  mysqld伺服器讀取設定檔的順序,對於有多個設定檔存在,且同一參數有多個值的情形,以最後一次讀取為準。
  命令列跟隨參數具有最高優先順序

  #當前mysql伺服器運行環境
  [root@rhel64a ~]# cat /etc/issue
  Red Hat Enterprise Linux Server release 6.4 (Santiago)
 
  #查看mysqld啟動時的預設選項
  [root@rhel64a ~]# mysqld --print-defaults
  mysqld would have been started with the following arguments:
  --socket=/tmp/mysql3306.sock --port=3306 --pid-file=/var/lib/mysql/my3306.pid --user=mysql --server-id=3306 --federated
  [root@rhel64a ~]# ps -ef|grep mysql
  root      2963  2840  0 14:10 pts/0    00:00:00 grep mysql
 
  # Author : Leshami
  # Blog  : 

  • 1
  • 2
  • 下一頁

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.