現在,當我嘗試去「domain.com/admin」問題從一個VPS遷移到一個新的XAMPP的Linux
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346
此外,我應該能夠使用到用phpmyadmin我得到這個錯誤域名如"domain.com/phpmyadmin"
,但不適用於新IP。
我做什麼:
安裝相同的XAMPP和配置安全。
[email protected]:~$ sudo chmod +x xampp-linux-x64-7.0.8-0-installer.run [sudo] password for sshadmin: [email protected]:~$ sudo ./xampp-linux-x64-7.0.8-0-installer.run ---------------------------------------------------------------------------- Welcome to the XAMPP Setup Wizard. ---------------------------------------------------------------------------- Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. XAMPP Core Files : Y (Cannot be edited) XAMPP Developer Files [Y/n] :y Is the selection above correct? [Y/n]: y ---------------------------------------------------------------------------- Installation Directory XAMPP will be installed to /opt/lampp Press [Enter] to continue: ---------------------------------------------------------------------------- Setup is now ready to begin installing XAMPP on your computer. Do you want to continue? [Y/n]: y ---------------------------------------------------------------------------- Please wait while Setup installs XAMPP on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing XAMPP on your computer. [email protected]:~$ sudo /opt/lampp/lampp start Starting XAMPP for Linux 7.0.8-0... XAMPP: Starting Apache...already running. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok. [email protected]:~$ sudo /opt/lampp/lampp security XAMPP: Quick security check... XAMPP: Your XAMPP pages are NOT secured by a password. XAMPP: Do you want to set a password? [yes] yes XAMPP: Password: XAMPP: Password (again): /opt/lampp/share/xampp/checkapache: line 41: /opt/lampp/htdocs/xampp/.htaccess: No such file or directory cp: cannot stat '/opt/lampp/htdocs/xampp/.htaccess': No such file or directory cp: cannot stat '/opt/lampp/htdocs/xampp/.htaccess': No such file or directory chmod: cannot access '/opt/lampp/htdocs/xampp/.htaccess': No such file or directory chmod: cannot access '/opt/lampp/htdocs/webalizer/.htaccess': No such file or directory chmod: cannot access '/opt/lampp/phpmyadmin/.htaccess': No such file or directory XAMPP: Password protection active. Please use 'xampp' as user name! XAMPP: MySQL is accessable via network. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes XAMPP: Turned off. XAMPP: Stopping MySQL...ok. XAMPP: Starting MySQL...ok. XAMPP: The MySQL/phpMyAdmin user pma has no password set!!! XAMPP: Do you want to set a password? [yes] yes XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL pma password. XAMPP: Setting phpMyAdmin's pma password to the new one. XAMPP: MySQL has no root passwort set!!! XAMPP: Do you want to set a password? [yes] yes XAMPP: Write the password somewhere down to make sure you won't forget it!!! XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL root password. XAMPP: Change phpMyAdmin's authentication method. XAMPP: The FTP password for user 'daemon' is still set to 'xampp'. XAMPP: Do you want to change the password? [yes] yes XAMPP: Password: XAMPP: Password (again): XAMPP: Reload ProFTPD...ok. XAMPP: Done.
副本的WinSCP從舊VPS到新的文件。
/opt/lampp/domain.com
編輯/opt/lampp/etc/httpd.conf
Include etc/extra/httpd-vhosts.conf
編輯/opt/lampp/etc/extra/httpd-vhosts.conf
<VirtualHost *:80> DocumentRoot "/opt/lampp/domain.com/" ServerName dotaskapp.com </VirtualHost>
編輯/opt/lampp/etc/extra/httpd-xampp.conf
<Directory "/opt/lampp/domain.com/">> AllowOverride All Order allow,deny allow from all Require all granted ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory> <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Require local Require ip myip ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory> <Directory "/opt/lampp/phpsqliteadmin"> AllowOverride AuthConfig Limit Require local Require ip myip ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory>
在瀏覽器:http://vpsIp/phpmyadmin/和導入數據的基礎上。
編輯/ etc /主機
127.0.0.1 domain.com
重新啓動XAMPP。
/opt/lampp/lampp restart
更改域名服務器IP爲新的VPS IP。
不工作**如何**?上述所有內容都是無用的,直到你能解釋什麼不起作用? –
Eddited,對不起。 –
1.這更多的是與操作相關的問題,而不是相關的開發。系統管理員可以提供更好的答案。 2.如果沒有實際的錯誤信息,我們只能猜出可能出錯的部分。 – Shadow