因為最近公司新的主機需要使用mysql還有讓開發人員便於管理的phpMyAdmin所以便研究了一下MYSQL跟phpMyAdmin
一開始想說使用偉大的yum來安裝,但是卻不是那麼順利
1.yum可以安裝mysql沒問題2.CentOS5.2的yum沒有phpMyAdmin,如果Fedora就可以用yum安裝phpMyAdmin
好現在從頭一步一步來講解怎麼做安裝 MySQL+phpMyAdmin1.#yum install mysql-server mysql php-mysql php-mbstring libmcrypt php-mcrypt
2.到phpMyAdmin網頁下載最新的套件http://www.phpmyadmin.net/home_page/index.php將下載回來的tar檔解開#tar zxvf phpMyAdmin-2.11.8.1-all-languages.tar.gz再將解壓縮的資料夾改名並移動到網頁的根目錄(預設為/var/www/html)#mv ./phpMyAdmin-2.11.8.1-all-languages /var/www/html/phpMyAdmin
設定再來就是將剛剛安裝好的與phpMyAdmin做個簡單的設定mysql安裝完最重要的就是將mysql內的管理者帳號root設定密碼等會登入phpMyAdmin時就需要這帳號與密碼.
MYSQL先將mysql的服務啟動#chkconfig mysqld on#service mysqld start
以下範例為將預設的空密碼改為"my1234"#mysqladmin -u root password my1234如果你是要將舊密碼改為"my1234"#mysqladmin -u root -p password my1234Enter password: <==這裡請輸入舊的密碼 phpMyAdmin先到phpmyadmin的目錄裡面#cd /var/www/html/phpMyAdmin產生config.inc.php設定檔預設是沒有這個檔案的,要先將config.sample.inc.php複製成config.inc.php#cp ./config.sample.inc.php ./config.inc.php將認證方式改為http或是cookie還有修改hostname 如果你要以http認證只要修改2個地方#vi ./config.inc.php$cfg['Servers'][$i]['auth_type'] = 'http'; <==改為http$cfg['Servers'][$i]['host'] = 'example.com.tw'; <==改成你的電腦名稱 如果你要以cookie認證方式那你還要多設一個地方#vi ./config.inc.php$cfg['blowfish_secret'] = 'gtry356dfgejdkv42jnl5'; <==隨便輸入亂數的字讓cookie做密碼加密演算,最多46個字$cfg['Servers'][$i]['auth_type'] = 'cookie'; <==改為cookie$cfg['Servers'][$i]['host'] = 'example.com.tw'; <==改成你的電腦名稱 做完以上2個設定就完成了因為之前有安裝一些php的套件,所以要重起httpd#service httpd restart到瀏覽器輸入以下網址http://localhost/phpMyAdmin/使用mysql的root與密碼就可以登入phpMyAdmin管理MYSQL了
Subscribe to:
Post Comments (Atom)
Prevent or Prohibit Server Drives From Being Visible to Users
To make changes to this policy for one of the seven default values: Start the Microsoft Management Console. On the Console menu, click Ad...
-
Connect to the ESXi host with SSH Stop the USB arbitrator service. This service is used to passthrough USB device from an ESX/ESXi host to...
-
If you see an error like SMTP -> ERROR: Failed to connect to server: Permission denied (13) , you may be running into SELinux preventing...
-
Exchange Server 2013 Unable to access OWA or ECP. - "Something went wrong" or "500 unexpected error"Open the ADSI editor on the primary domain controller Go to CN=Configuration --> CN=Services --> CN=Microsoft Exchange --> CN=...
No comments:
Post a Comment