ekkelon wrote:If I can't export the DB ... the data/myDB (for example) folder in XAMPP/mysql folder is the complete DB? Can I use use to insert in online hosting?
Thnx.
Yes and no. It may work, but it depends on releases and configuration of MySQL / MariaDB. If they have same configuration and more or less same release, you can use the whole mysql/data folder (not the mysql folder, thats too much) also Online. But this requires the possibility to access the MySQL installation Online, that usually is not possible with basic webhosting. You need to run your own server.
Instead you also may use the exported file which you created with mysqldump. If you want to import the database, run this command on the target machine (you have to upload and / or copy the export file to the server before):
- Code: Select all
c:/xampp/bin/mysql -u USER -pPASSWORD DATABASENAME <myfile.sql
where USER is to replace by the admin user of MySQL ("root" in case of Xampp), PASSWORD is the password (Xampp comes without a password, you may leave out that parameter for Xampp) and DATABASENAME is the name of the database (i.e. wordpress or so). ATTENTION: there MUST be a space between "-u" and USER, but MUST NOT be between "-p" and PASSWORD.
If the target machine is not a Windows Xampp installation, you have to replace c:/xampp/bin/mysql by a proper command, i.e. only "mysql" or "/usr/bin/mysql" or similar. That depends on your installation and operating system.