亚洲Aⅴ无码Av红楼在线观看_国产午夜福利涩爱AⅤ_国产sm调教一区二区三区_精品人妻一区二区三区不卡毛片

始創(chuàng)于2000年 股票代碼:831685
咨詢熱線:0371-60135900 注冊(cè)有禮 登錄
  • 掛牌上市企業(yè)
  • 60秒人工響應(yīng)
  • 99.99%連通率
  • 7*24h人工
  • 故障100倍補(bǔ)償
全部產(chǎn)品
您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

MySQL源碼安裝完成后修改安裝路徑啟動(dòng)問題

發(fā)布時(shí)間:  2012/8/21 16:49:34

在Linux上源碼編譯安裝完mysql后,又將安裝的路徑進(jìn)行了修改,但是發(fā)現(xiàn)在設(shè)置后環(huán)境變量后啟動(dòng)報(bào)錯(cuò),如下:

[root@www.linuxidc.com var]# mysqld_safe --user=mysql &

[1] 31248

[root@www.linuxidc.com var]# 110422 11:04:00 mysqld_safe Logging to '/opt/mysql5156/var/HServer_03.err'.
-
 

touch: cannot touch `/opt/mysql5156/var/HServer_03.err': No such file or directory

chown: cannot access `/opt/mysql5156/var/HServer_03.err': No such file or directory

110422 11:04:00 mysqld_safe The file /opt/mysql5156/libexec/mysqld

does not exist or is not executable. Please cd to the mysql installation

directory and restart this script from there as follows:

./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

/usr/local/mysql/bin/mysqld_safe: line 100: /opt/mysql5156/var/HServer_03.err: No such file or directory

[1]+ Exit 1 mysqld_safe --user=mysql

按照提示原有的路徑目錄不存在,需要到mysql的相對(duì)路徑下啟動(dòng)~

我的原安裝路徑是在/opt/mysql5156下,具體的安裝過程:

Shell> tar –zxvvf mysql-5.1.56.tar.gz

Shell> cd mysql-5.1.56

Shell> ./configure --prefix=/opt/mysql5156 \

--with-charset=utf8 --with-collation=utf8_general_ci \

--with-extra-charsets=latin1,gb2312 \

--with-plugins=innobase,innodb_plugin,myisam,heap,csv,federated,blackhole \

--enable-local-infile --enable-thread-safe-client

Shell> make

Shell >make install

Shell> cp support-files/my-medium.cnf /etc/my.cnf

Shell>cd /opt/mysql5156

Shell>chown –R mysql .

Shell>chgrp –R mysql .

Shell>bin/mysql_install_db –user=mysql

Shell>chown –R root .

Shell> chown –R mysql var

Shell>vi /root/.bash_profile

PATH=$PATH:$HOME/bin:/opt/mysql5156/bin

現(xiàn)在將/opt/mysql5156/目錄移動(dòng)到/usr/local/下:

Shell>mv /opt/mysql5156 /usr/local/mysql

Shell>vi /root/.bash_profile

PATH=$PATH:$HOME/bin:/usr/local/mysql/bin

Shell>source /root/.bash_profile

在啟動(dòng)時(shí)出現(xiàn)上述錯(cuò)誤的主要原因是mysql在編譯安裝時(shí),將路徑/opt/mysql5156寫入了mysql/bin/mysqld_safe腳本中,打開該腳本可以明確看到各個(gè)啟動(dòng)邏輯的判斷都有/opt/mysql5156的影子,那么將所有的/opt/mysql5156 全局替換為/usr/local/mysql,保存后重新啟動(dòng),ok了。

另外由于這次的編譯安裝時(shí)采用動(dòng)態(tài)編譯的,還需要修改mysql的動(dòng)態(tài)函式庫,

Shell>vi /etc/ld.so.conf

/usr/local/mysql/lib/mysql/

Shell>ldconfig

這樣在新的路徑下,編譯安裝的mysql就可以無礙使用了。


本文出自:億恩科技【www.allwellnessguide.com】

服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經(jīng)營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經(jīng)營性ICP/ISP證:贛B2-20080012
  • 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
  • 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
  • 專注服務(wù)器托管17年
    掃掃關(guān)注-微信公眾號(hào)
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
      0
     
     
     
     

    0371-60135900
    7*24小時(shí)客服服務(wù)熱線