migrating from xampp to a remote host

Problems with the Windows version of XAMPP, questions, comments, and anything related.

migrating from xampp to a remote host

Postby uncertain » 26. December 2012 20:31

I have developed a database using XAMPP. Please would you explain how I migrate the database and its php pages to a remote commercial host.
The steps I think I already understand are:
1. Use phpMyAdmin to export an SQL file of my database and tables.
2. Use my FTP client to transfer the SQL file and all the php and html files from htdocs to the public_html folder in the host.
3. Use the host's control panel to access phpMyAdmin and then import the SQL file containing my database and tables.

Its the next bit that I find diffcult to understand:

Databases created directly on the host using phpMyAdmin are prefixed with my control panel username. How do I cope with this as my XAMPP database is not prefixed with my CP username.

My mysqli_connect.php file contains the details relevant to the database created with XAMPP. Which of those details have to be changed in order to access the database on the host. Can I assume that the user, password and localhost can remain unchanged?
uncertain
 
Posts: 6
Joined: 26. December 2012 20:26
XAMPP version: 7.1.1
Operating System: Windows 10

Re: migrating from xampp to a remote host

Postby Altrea » 30. December 2012 17:51

Hi uncertain,

uncertain wrote:Please would you explain how I migrate the database and its php pages to a remote commercial host.

That depends highly on the possibilities you have on your commercial host.

uncertain wrote:1. Use phpMyAdmin to export an SQL file of my database and tables.

That is one way which will work in most cases. An even better way to export your database would be the command line tool mysqldump, because phpmyadmin is depended on the time and ressource limits of php. mysqldump comes with MySQL and can be found in your \xampp\mysql\bin\ folder.
You don't need to execute the mysql dump command yourself. It is highly recommend to use the really good tool MySQL Workbench for that.

uncertain wrote:2. Use my FTP client to transfer the SQL file and all the php and html files from htdocs to the public_html folder in the host.

If you have a FTP account, that is the common way. One thing to remember is that you maybe need to set some file permissions with CHMOD for writeable files, if your commercial hoster uses a Linux OS.

uncertain wrote:3. Use the host's control panel to access phpMyAdmin and then import the SQL file containing my database and tables.

If you have remote access to your hosters database, then you could import the data directly with MySQL Workbench again.
Again, phpmyadmin is dependend on the php configuration, so it might happen, that your import ends incomplete.

uncertain wrote:Databases created directly on the host using phpMyAdmin are prefixed with my control panel username. How do I cope with this as my XAMPP database is not prefixed with my CP username.

In most cases that is not that important. simply add the prefix in front of the database name setting.

uncertain wrote:My mysqli_connect.php file contains the details relevant to the database created with XAMPP. Which of those details have to be changed in order to access the database on the host. Can I assume that the user, password and localhost can remain unchanged?

That again depends on your hoster. Your hoster have given you at least host, username and password for database login. These data are needed. The forth data needed in your database connection file is the database name, thats the one with the prefix.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 149 guests