how to config databases to another drive?

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

how to config databases to another drive?

Postby carsten888 » 16. December 2018 09:27

I installed xxamp on c, but have my websites and databases on d:

I altered in sql ini
datadir="e:/_websites/xxamp-server-stuff/databases"

quit and restarted but doe snot show the new location.
What am I overlooking?
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to config databases to another drive?

Postby Nobbie » 16. December 2018 11:06

Drive letters from USB Drives, Networks, NAS etc. are only known to the logged in Windows User, not to System User, which executes Apache when running as service. Do Not run Apache, Mysql etc. as service if you want to use Drive Letters for Network etc.

If you have your databases on d:, you must specify d: and not e: as well (see your description)
Nobbie
 
Posts: 10670
Joined: 09. March 2008 13:04

Re: how to config databases to another drive?

Postby carsten888 » 16. December 2018 14:12

sorry, that was a typo. I got all data on D:, windows and apps on C:. Both are ssd-s in my laptop.
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to config databases to another drive?

Postby carsten888 » 19. December 2018 10:40

I tried again a few days later and it all of a sudden shows my databases in phpmyadmin.

When I creating a new database it all works.

But when in phpmyadmin I open tables of the old databases I get this error:

#1932 Table 'table_name' doesn't exist in engine

screenshot:
https://i.postimg.cc/PfzpyzDZ/Capture91.png

(my windows 10 broke, I ended up doing a fresh install, long story, so I got the databases which worked from D:, but all on C: was lost. Good thing I stored data on another drive then windows, but now getting sql to 'recognize' then in its mysteriuous 'engine'...)

how to fix those databases?
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to config databases to another drive?

Postby Nobbie » 19. December 2018 11:57

Obviously, the ibdata files (i.e. ibdata1) is corrruptedt. Probably, you deleted it, or you overwrote it or whatever. This error typically comes, when a table is defined in a database (which is stored in the folder with the name of the database), but there is no more data for that table in ibdata1 (which is the proprietary file system for INNODB engine).

The ony fix for that is having a non-corrupted backup.
Nobbie
 
Posts: 10670
Joined: 09. March 2008 13:04

Re: how to config databases to another drive?

Postby Altrea » 19. December 2018 12:12

You could try to restore the ibdata1 file like described here:
http://zadpen.com/20-restore-lost-data- ... data1.html

I have never tried that on my own, so no warranties for data loss.
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: 9461
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: how to config databases to another drive?

Postby carsten888 » 20. December 2018 14:59

Nobbie wrote:Obviously, the ibdata files (i.e. ibdata1) is corrruptedt. Probably, you deleted it, or you overwrote it or whatever.

yes, had to reinstall windows, so lost all on C:/
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to config databases to another drive?

Postby carsten888 » 20. December 2018 15:01

Altrea wrote:You could try to restore the ibdata1 file like described here:
http://zadpen.com/20-restore-lost-data-in-mysql-using-innodb-engine-without-file-ibdata1.html

I have never tried that on my own, so no warranties for data loss.

Thank you. But I won't try that. Its per table! And I got like 10-15 Joomla databases. Nah. That will take days.

I will just download the databases from the live sites.
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10

Re: how to config databases to another drive?

Postby carsten888 » 20. December 2018 15:06

hard lesson learned:
An untested backup = no backup


Backing-up the database files is no way to backup databases. Just export to sql-files. So the whole idea of having the databases on another drive, so they would be easy to backup, was pointless. :?
carsten888
 
Posts: 18
Joined: 16. December 2018 09:05
XAMPP version: 7.3.0
Operating System: windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 75 guests