Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Trying to move MySQL databases on Windows 7



Threaded Mode | Print  

 Trying to move MySQL databases on Windows 7, MySQL won't start if the usual methods are used (3 Replies, Read 3631 times)
ericscoles
Group: Member
Post Group: Newbie
Posts: 6
Status:
Due to space limitations (my desktop is configured with a small-ish SSD as its C: drive) I need to keep my databases to a different drive.

I would expect to be able to do this by editing the my.ini, thus:

  1. Open the AMPPS control panel
  2. Stop Apache & MySQL
  3. Click on the MySQL tab, then Configuration
  4. Edit the datadir parameter to point to the new location
  5. Restart Apache & MySQL


When I do this, MySQL won't start. No error messages are written to the MySQL log.

I used essentially this procedure to move the datafile on a Windows 2012 server (not using AMPPS) just the other day, and it worked fine. On this Windows 7 desktop running AMPPS, it's failing. What do I need to do in order to successfully move the data directory when using AMPPS on Windows 7?


IP: --   

Trying to move MySQL databases on Windows 7
ericscoles
Group: Member
Post Group: Newbie
Posts: 6
Status:
Here's some additional information. I originally reported that there were no error messages -- I thought that was true because I was getting to the Error file via the Softaculous panel. If I delete the error file in the new database root and start AMPPS from scratch, I see this:

Code

2015-04-30 22:25:16 13536 [Warning] You need to use --log-bin to make --binlog-format work.
2015-04-30 22:25:16 13536 [Note] Plugin 'FEDERATED' is disabled.
2015-04-30 22:25:16 13536 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-04-30 22:25:16 13536 [Note] InnoDB: The InnoDB memory heap is disabled
2015-04-30 22:25:16 13536 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-04-30 22:25:16 13536 [Note] InnoDB: Memory barrier is not used
2015-04-30 22:25:16 13536 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-04-30 22:25:16 13536 [Note] InnoDB: Not using CPU crc32 instructions
2015-04-30 22:25:16 13536 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-04-30 22:25:16 13536 [Note] InnoDB: Completed initialization of buffer pool
2015-04-30 22:25:16 13536 [Note] InnoDB: The first specified data file .\ibdata1 did not exist: a new database to be created!
2015-04-30 22:25:16 13536 [Note] InnoDB: Setting file .\ibdata1 size to 12 MB
2015-04-30 22:25:16 13536 [Note] InnoDB: Database physically writes the file full: wait...
2015-04-30 22:25:17 13536 [Note] InnoDB: Setting log file .\ib_logfile101 size to 48 MB
2015-04-30 22:25:17 13536 [Note] InnoDB: Setting log file .\ib_logfile1 size to 48 MB
2015-04-30 22:25:18 13536 [Note] InnoDB: Renaming log file .\ib_logfile101 to .\ib_logfile0
2015-04-30 22:25:18 13536 [Warning] InnoDB: New log files created, LSN=45781
2015-04-30 22:25:18 13536 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-04-30 22:25:18 13536 [Note] InnoDB: Doublewrite buffer created
2015-04-30 22:25:18 13536 [Note] InnoDB: 128 rollback segment(s) are active.
2015-04-30 22:25:18 13536 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-04-30 22:25:18 13536 [Note] InnoDB: Foreign key constraint system tables created
2015-04-30 22:25:18 13536 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-04-30 22:25:18 13536 [Note] InnoDB: Tablespace and datafile system tables created.
2015-04-30 22:25:18 13536 [Note] InnoDB: Waiting for purge to start
2015-04-30 22:25:18 13536 [Note] InnoDB: 5.6.23 started; log sequence number 0
2015-04-30 22:25:18 13536 [Note] Server hostname (bind-address): '*'; port: 3306
2015-04-30 22:25:18 13536 [Note] IPv6 is available.
2015-04-30 22:25:18 13536 [Note]  - '::' resolves to '::';
2015-04-30 22:25:18 13536 [Note] Server socket created on IP: '::'.
2015-04-30 22:25:18 13536 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2015-04-30 22:25:18 13536 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2015-04-30 22:25:18 13536 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2015-04-30 22:25:18 13536 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2015-04-30 22:25:18 13536 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.
2015-04-30 22:25:18 13536 [Note] Event Scheduler: Loaded 0 events
2015-04-30 22:25:18 13536 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.6.23'  socket: ''  port: 3306  MySQL Community Server (GPL)


So, I know it's able to find the new directory because that's where it's writing the error file. But it still doesn't seem to be able to load the database.

I also know that it was able to load the database from the old location, because I can successfully load phpMyAdmin if I restore the default configuration.
IP: --   

Trying to move MySQL databases on Windows 7
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Hi ericscoles,

Move only Ampps/mysql/data directory to different drive.
open mysql.ini  (Ampps --> MySQL -->Configuration).
datadir="new_path_to/data"

Note: you can Run MySQL from Ampps control panel but you have to stop MySQL process from Task Manager and you have to manually delete *.pid file from data folder.


       
IP: --   

Trying to move MySQL databases on Windows 7
ericscoles
Group: Member
Post Group: Newbie
Posts: 6
Status:
I will try manually deleting the PID file. Everything else I've already tried.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 18, 2024, 8:43 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.040