I was on windows and using XAMPP(installed somewhere else than C:/ )
Now i have moved on to LINUX and installed LAMPP.
So, i have this XAMPP folder from windows and i copied the project files from htdocs and now i need the database which i didn't exported while i was on windows.
I tried to copy the phpmyadmin folder from the old XAMPP folder but couldn't get it to work.
So how can i access the previous OS phpmyadmin to use my existing databases -
using linux (MINT - rosa-cinnamon)
Thanks in Advance !
If you want to move databases between hosts - especially when there are differences in the MySQL daemon version, operating systems (-versions) or storage schema - you should create a MySQL dump at host A and import it on host B: http://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
If this is no option for you anymore, you can try to move the old MySQL data directory (Configured in my.ini on windows, somewhere in the xampp directory) to the location where the new MySQL daemon stores its data files (Normally configured at /etc/mysql.my.cnf). A few more hints on this:
Ensure to modify the file permissions on the data files at the new location that the MySQL daemon can work with them.
On Windows, MySQL table names are case insensitive. On Linux they are case sensitive. Keep that in mind, if your application complains about missing tables.
And of course: Test this with backups only!
Related
I installed Yosemite
Renamed MAMP to MAMP_old
Did a clean install of MAMP
Copied the db folder from old into the the new one
Now none of my databases appear in PHPMyAdmin
Inside the db/mysql folder I see the folder for my old databases, but there are no sql files. For example a Wordpress folder contains .frm files and db.opt files.
I tried doing this (using the link below), but I don't seem to have a mysql folder usr/local/
/usr/local/mysql/bin/mysqldump -u root -p[pass] [db] > [filename].sql
Can't access MySQL databases after upgrade to Mountain Lion (using MAMP)
What should I do to restore my old databases? I have very limited knowledge in this area.
Many thanks
I ran into this problem with upgrading to MAMP PRO 5 from 4. The following article proved invaluable:
https://appsolute.zendesk.com/hc/en-us/articles/215198946-I-upgraded-to-MAMP-PRO-5-and-I-am-missing-databases-
To quote:
Your old MySQL 5.6 data is in
/Library/application support/appsolute/MAMP PRO/db/mysql56_2018_xxxx
To be on the safe side, first make backups of your host data, and your
entire /Library/application support/appsolute/MAMP PRO/db/
To verify this is your old data, look inside of this mysql56_2018_xxx
folder, you should see subdirectories of all of your old databases in
this folder.
If you see missing databases in MAMP PRO 5, you can "reupgrade" your
old data by doing the following.
Quit MAMP PRO
Rename your mysql57 folder to mysql57_back
Make a copy of your mysql56_2018_xxxx folder, name it mysql57.
Start MAMP PRO, start your servers
Run Tools > Upgrade MySQL DB
Notes:
Instructions available online for MAMP (not MAMP PRO) may be misleading.
The above refers not to the /Library inside the package contents of the MAMP PRO app, but /Library from the root of your drive.
In my case the complete original databases were in the folder simply named mysql56. There were additional incomplete date-stamped folders suggestive of failures during the original DB update process.
Here is a link to an article which I think can help anyone in a similar situation:
How to Upgrade MAMP
So the basic idea is that you will need to copy your db files from the old MAMP folder to the new MAMP folder.
Another technique you could use would be do a mysqldump before upgrading, then import that dump file into the new version of MAMP.
I was working with XAMPP 1.8.3-3 on OS X Mavericks. After upgrading to Yosemite Mysql server stopped working. And an upgrade to XAMPP 1.8.3-5 fixed the problem and mysql server starts working.
Now the entire database list is showing on phpmyadmin, but no access to the tables. Its showing “#1146 - Table ‘DB_NAME.TABLE_NAME’ doesn’t exist”.
Unfortunately I don't have any DB backup!
I have the entire XAMPP folder backup. So how I can able to retrieve the mysql tables?
just type /Applications/XAMPP/xamppfiles/bin/mysql.server start
in terminal then start xampp
you can restore if you have all the mysql folders from XAMPP folder. (check /XAMPP/xamppfiles/var/mysql in backup)
if you have var/mysql folder, open and look for database names you had earlier.
there is a separate folder for each database you had earlier. open the folder and it will contain lots of files with table names.
if your old table engine is InnoDB you will see 2 files. with .frm and .ibd extensions.
or if you had MyISM it will contain three file per table which has .frm, .MYD and .MYI extensions.
after you verify you have all the required files in backup, you can start restoring them.
stop mysql
copy required database folder completely and paste it to currently installed folder. (/Applications/XAMPP/xamppfiles/var/mysql/)
start mysql
to restore web files, open htdocs folder in backup and copy required site folder to currentely xampp installed htdocs folder.
This solution worked for me. Good Luck !
Do a clean install. See my answer for my own question. xampp mysql server not starting. The bad part is that I'm not sure if it will save your database the way I explained. What you might try is going to xampp > xamppfiles > var > mysql > 'your database name' and making a copy of the database folder on your desktop and moving it back once you reinstall it. I tried and I think it might have worked had I changed the file permissions. You can also try experimenting to see if it preserves the database if you do this. I would do some serious testing if you really want to save your database before doing this.
I have a hard disk that MySQL 5 has been installed on it (this hard disk belongs to another PC with Windows XP) and I've connected it to my PC. How can i copy its MySQL data to another MySQL 5 ??
thanks in advance.
you can try this.
Shut down both mysql server.
Locate the mysql data directory (e.g. /. If your database use myisam as engine you will find for any database a folder. In this folder are the files for each table, indexfiles and datafiles. Copy the folder to the data directory on your pc.
Start your mysql server.
PS: Check the version of both servers.
Or you can use mysqldump this is an command line utility for mysql. After export copy the export file to your server and use this command:
mysql -u<username> -p<password> < <exportfilename>
Kind Regards
I'm using MAMP (OS-X 10.6.6) and I want to move my mySQL db folder to my dropbox folder.
The MySQL server MAMP runs stores its databases in
/Library/Application Support/appsolute/MAMP PRO/db/mysql
..and I can't get it to follow symlinks or aliases to the mysql folder.
Is there a way to change the path mySQL uses for storing its databases? On the MAMP forum they say it's not possible, but I imagine there must be some kind of config file for whatever mySQL server it is that MAMP is running that can be changed to specify an alternative location for the used DBs..?
Anyone know how to acheive this? Storing the DB's on dropbox is the last element I need to solve to be able to work on my projects from my different computers.
Just realized that its just the finder 'alias' type that won't work. creating a proper unix symlink works fine. so doing this solves the problem and keeps the databases on dropbox.
ln -s /Users/username/Dropbox/MAMP_db/mysql /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql
mwb's method works. Remember, you also need to be be running Apache/MySQL server as user. Those settings are in MAMP PRO (Server -> General)
If you are going to be using dropbox to access the database on another machine, you will need to have identical paths to Dropbox as well.
I'm attempting (and failing) to upgrade MySQL on Mac OS X Server (Leopard) and running into trouble. Though the OS X Server docs say it's "normal" to have multiple versions of MySQL on your machine they don't go into any detail of how to "manage" them.
I have built and installed a newer version (5.1.40) than the original that Apple bundled (5.0.x).
Server Admin seems to manage only the initial (5.0.x) installation in /usr/bin
So I've STOPPED that version in Server Admin but can't get the new one (in /usr/local/mysql) to work.
Ideally I'd like to point the new version of mysql at the old database files in /var/mysql but not sure how...
Edit: Looks like my new MySQL is active (for some users anyway) but it's pointing to a different data file. It's pointing to /usr/local/mysql/data and I want it to point to /var/mysql
Admin user can connect but others get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). I'm assuming because this new database doesn't have those users enabled yet?!?! though I'd think I could still $ mysql -u root -p to it?!?
Anyone know how to manage this?
Well, I renamed the new MySQL's data directory to data.backup and then I created a symlink from where the new MySQL's data folder was to /var/mysql (where the old data file is) and so far so good... New version of MySQL is running and using the existing data file for its databases...
I'm not sure how to resolve your issue, but maybe you could trying using Homebrew or another OS X package manager to handle your software.
Will make upgrading in future a breeze.
EDIT: Sorry, just realized you are using OS X SERVER, I'm not familiar with it or if you should be using Homebrew on it.