溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

MYSQL服務(wù)如何安裝

發(fā)布時間:2022-01-14 16:10:44 來源:億速云 閱讀:109 作者:小新 欄目:數(shù)據(jù)庫

這篇文章主要介紹了MYSQL服務(wù)如何安裝,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

系統(tǒng)環(huán)境信息
  CentOS release 6.3 (Final)
  VMware? Workstation 9.0.0 build-812388
  rpm安裝包準備
  1 從光盤拷貝如下安裝包到指定目錄
  2 也可以從RPM資源網(wǎng)站下載到本地環(huán)境
  perl-DBI-1.609-4.el6.i686.rpm
  mysql-libs-5.1.61-4.el6.i686.rpm
  mysql-5.1.61-4.el6.i686.rpm
  perl-DBD-MySQL-4.013-3.el6.i686.rpm
  mysql-server-5.1.61-4.el6.i686.rpm
  目錄名稱
  /usr/dev/mysql
  卸除原有MYSQL服務(wù)
  操作步驟
  #cd /usr/dev
  #rpm -ivh perl-DBI-1.609-4.el6.i686.rpm
  #rpm -ivh mysql-libs-5.1.61-4.el6.i686.rpm
  #rpm -ivh mysql-5.1.61-4.el6.i686.rpm
  #rpm -ivh perl-DBD-MySQL-4.013-3.el6.i686.rpm
  #rpm -ivh mysql-server-5.1.61-4.el6.i686.rpm
  #/usr/bin/mysql_install_db --user=mysql
  #/usr/bin/mysqld_safe &
  #/etc/init.d/mysqld status
  備注
  命令7含義 初始化MYSQL數(shù)據(jù)庫 該命令用來初始化 mysql數(shù)據(jù)庫,即創(chuàng)建/var/lib/mysql目錄
  命令8含義 啟動MYSQL服務(wù)
  命令9含義 查看MYSQL啟動狀態(tài)
  執(zhí)行命令7后顯示如下信息
  ========================================================
  Installing MySQL system tables...
  OK
  Filling help tables...
  OK
  To start mysqld at boot time you have to copy
  support-files/mysql.server to the right place for your system
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  To do so, start the server, then issue the following commands:
  /usr/bin/mysqladmin -u root password 'new-password'
  /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
  Alternatively you can run:
  /usr/bin/mysql_secure_installation
  which will also give you the option of removing the test
  databases and anonymous user created by default.  This is
  strongly recommended for production servers.
  See the manual for more instructions.
  You can start the MySQL daemon with:
  cd /usr ; /usr/bin/mysqld_safe &
  You can test the MySQL daemon with mysql-test-run.pl
  cd /usr/mysql-test ; perl mysql-test-run.pl
  Please report any problems with the /usr/bin/mysqlbug script!
  ================================================
  執(zhí)行命令8后顯示如下信息
  ================================================
  mysqld_safe Logging to '/var/log/mysqld.log'.
  mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
  ================================================
  執(zhí)行命令9后顯示如下信息
  ================================================
  mysqld (pid  4200) is running...
  ================================================

感謝你能夠認真閱讀完這篇文章,希望小編分享的“MYSQL服務(wù)如何安裝”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI