首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从一个vps迁移到一个新的XAMPP的问题

问从一个vps迁移到一个新的XAMPP的问题
EN

Stack Overflow用户
提问于 2016-08-17 19:24:58
回答 1查看 258关注 0票数 0

现在,当我尝试转到"domain.com/admin“时,会发现这个错误。

代码语言:javascript
复制
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并配置安全性。 sshadmin@ubuntu-512mb-nyc3-01:~$ sudo chmod +x xampp-linux-x64-7.0.8-0-installer.run [sudo] password for sshadmin: sshadmin@ubuntu-512mb-nyc3-01:~$ 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. sshadmin@ubuntu-512mb-nyc3-01:~$ 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. sshadmin@ubuntu-512mb-nyc3-01:~$ 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。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-19 06:32:42

为了解决域问题,我更改了名称服务器,因为我的新VPS只接受他们自己的名称服务器。

“无法使用所提供的设置连接到数据库服务器”的问题。

修正了在phpMyAdmin中添加具有相同凭据的新用户。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39004731

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档