熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

linux下mysql遠程連接

2013-11-23 21:01:19  來源: MySQL 

  對大家推薦很好使用的Linux mysql系統像讓大家對Linux mysql系統有所了解然後對Linux mysql系統全面講解介紹希望對大家有用今天特意配置了mysql apache php 雖然網上很多這方面的例子但是很多是作者再回憶寫的所以難免有筆誤的地方而這些東西正是新手很困惑的地方一下是我的安裝筆記在Centos虛擬機上安裝成功中文的參考英文的參考 How to Install MySQL on LinuxHow to Install PHP on Linux How to Install Apache on Linux

  Linux mysqlapache php 安裝過程將apache mysql php 的targz 文件復制到/home/tmp目錄接著執行下面的命令

  Linux mysql 安裝

  cd /home/tmp

  groupadd mysql

  useradd g mysql mysql

  tar zxvf mysqltargz

  cd mysql

  /configure prefix=/usr/local/mysql

  make

  make install

  cd /usr/local/mysql

  chown R root

  bin/mysql u root p

  chgrp R mysql (注意有個

  cd /home/tmp

  cd mysql

  ln s /usr/local/mysql/ /usr/local/mysql

  cp supportfiles/f /etc/f

  修改f 在[sqld]下面添加user=mysql

  chown root /etc/f

  chgrp root /ect/f

  chmod /etc/f

  /usr/local/mysql/bin/mysqld_safe user=mysql &

  cp supportfiles/mysqlserver /etc/initd/mysql

  chmod /etc/initd/mysql

  chkconfig add mysql

  chkconfig level mysql on

  /usr/local/mysql/bin/mysql_install_db  user=mysql

  /usr/local/mysql/bin/mysql u root(如果能進入mysql 命令行說明mysql 配置成功)

  edit /etc/f

  [client] + defaultcharacterset=utf [mysqld] + defaultcharacterset=utf [mysql] + defaultcharacterset=utf

  apache安裝請先進入/home/tmp目錄(cd /home/tmp)

  tar zxvf

  cd prefix=/usr/local/apache enableso enablerewrite enableauthdigest=shared enablessl enabledeflate

  make

  history

  make install

  cp /usr/local/apache/bin/apachectl  /etc/initd

  chmod /etc/initd/apachectl

  /usr/local/apache/bin/apachectl start

  php的安裝

  cd /home/tmp

  tar xzf phptargz

  cd php

  /configure prefix=/usr/local/php \

  withapxs=/usr/local/apache/bin/apxs \

  withmysql=/usr/local/mysql \

  withpdomysql \

  withzlib \

  withlibxmldir \

  withxsl \

  enablembstring \

  enablezendmultibyte \

  enablesockets \

  enablesoap \

  enablezip

  Linux mysql

  make install修改apache (apache/conf/)添加如下部分LoadModule php_module modules/libphpso AddType application/x

  cp phpinidevelopment /usr/local/php/lib/phpini

  /usr/local/apache/bin/apachectl start

  /usr/local/apache/bin/apachectl stop

  /usr/local/apache/bin/apachectl start

  附Linux mysql 允許遠程連接

  /usr/local/mysql/bin/mysql u root p  (進入mysql)

  use mysql;

  SELECT `Host``User` FROM user;

  UPDATE user SET `Host` = % WHERE `User` = root LIMIT ;

  flush privileges;

  注意在mysql 命令行形式下一定要輸入;

  v經過configure就可以make了

  Linux mysql

  make install注意pdo_mysql的全路徑我的是

  /usr/local/php/lib/php/extensions/debugnonzts/pdo_mysqlso

  然後在/usr/local/lib/phpini

  加上一句

  extension=/usr/local/php/lib/php/extensions/debugnonzts/pdo_mysqlso

  重新啟動apache即可看到已經加載pdo_mysql成功


From:http://tw.wingwit.com/Article/program/MySQL/201311/29457.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.