LINUX下Apache PHP MySQL的配置與使用

來源:互聯網
上載者:User

標籤:

安裝環境:

Deepin:2014.3案頭版

使用LAMP整合套件安裝,安裝命令:sudo apt-get install lamp^

  安裝包安裝的是apache2+PHP5+MySQL5

如需安裝phpMyAdmin,使用命令 sudo apt-get install phpmyadmin

1、關於apache的安裝目錄

參考串連:http://blog.csdn.net/yusiguyuan/article/details/9566437

2、關於apache的配置問題

2.1:修改監聽連接埠

在etc/apache2/port.conf中修改監聽連接埠號碼,重啟即可。

 

3、關於MySQL的一些問題

MySQL的安裝目錄結構

資料庫目錄:/var/lib/mysql/

設定檔:/usr/share/mysql(mysql.server命令及設定檔)

相關命令:/usr/bin(mysqladmin、mysqldump等命令)(*mysql的一種安全啟動方式:/usr/bin/mysqld_safe  --user=root &)

啟動指令碼:/etc/rc.d/init.d/

3.1第一次啟動

啟動目錄是/usr/bin

第一次進入使用命令

使用命令/usr/bin/mysqladmin -u root password yourPassword

如果系統提示

mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: NO)‘

則說明你安裝的時候沒有設定密碼

使用命令/usr/bin/mysqladmin -u root直接可以進到mysql

3.2修改root密碼

mysql -u root -p

斷行符號後提示輸入密碼

3.3修改使用者密碼

mysqladmin -u使用者名稱 -p舊密碼 password 新密碼
或進入mysql命令列SET PASSWORD FOR root=PASSWORD("root");

3.3新增使用者

 

3.4停止 啟動mysql

[[email protected] /]#service mysql stop;

[[email protected] /]#service mysql start;

LINUX下Apache PHP MySQL的配置與使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.