Manually placing MySQL database files in the data folder - WAMP - XAMPP - mysql

I recently switched from using XAMPP to WAMP on my Windows 7 machine so I can do fast switching of PHP versions.
I completely uninstalled XAMPP, but first I backed up my htdocs, apache and mysql directories just in case.
After I installed WAMP and had everything up and running, I figured I could just drop some of my databases from my old XAMPP install into the "data" directory of the mysql directory in WAMP.
So that worked and the database shows up in phpMyadmin, but there are no tables. Is this a permissions thing? Like maybe I don't have the same user in the new install of mysql? Or am I missing something?
Am I allowed to just copy MySQL databases from one data folder to another or does it not work that way?
Both instances are using MySQL 5.5 (at least that's what both README files say in both MySQL directories).
THANKS

When using phpMyAdmin out of the box so to speak in WAMP, MYSQL is installed as per its default installation with the root userid setup to have NO PASSWORD.
Some people seem to think they should make one up when they see the login screen, is that what you are doing?
When you do this phpmyadmin allows you to APPEAR to login but then as you do not have root's privilages you see almost nothing on its other screens and are allowed to do nothing.
Use
username = root
password = (leave this blank)
Then set a password, there is a link on the next page it presents. AND DONT FORGET IT!!!!

This generally isn't a good idea. RiggsFolly was asking about your table type because some table types are more forgiving than others. Other possible trouble spots include file system permission problems or MySQL permission problems (as RiggsFolly asked).
I'd suggest to do an export (as an SQL file) and import that for a complete solution.

Related

I Didn't Get Option To Set Root Password Of Mysql During Installation

I didn't get option to set root password of mysql during installation. Now, I am unable to form instance I am beginner in mysql I have tried reinstallating the software watching youtube still didn't got that option.
Actually I had solved this problem the day after posting this question.. My main problem was I was not getting wizard for saving information regarding root password port and etc. I figured after installing quite a few time that I have been clicking on update before the actual product installation as that was first question before installing... Not having previous verison of mysql I was unable to get root wizard i.e I was able to install product but while create database or server I was having trouble with password because it was not set while installation process... Clicking on no before installation for update solved my issue
This might be useful if you have installed mySql community server.
Download MySQL Installer from here if you haven't already, then open the installer and you might see some products listed in the section, then click on reconfigure of mySQL Server, it will take you through the instructions of setting up few things including your password(which you'll probably find after clicking "next" a few windows).

cs cart - mySQL error on local host

I have an issues installing cs-cart on local enviroment, these are the errors:
MySQL settings are not valid
Could not connect to database
I've created a database named cart - and this is the name that I write in the MySQL database name from the installation wizard.
I've created an username and a password for this username - both are filled in correctly.
I have some when I open PhpMyAdmin -
A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is 4.4.14.1, released on 2015-09-08.
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
Or alternately go to 'Operations' tab of any database to set it up there.
I use XAMPP.
Any thoughts on how can I solve this?
Did you check your config.local.php in the CS-Cart root dir? That file stores your MySQL database configuration.
I ran into the same issue here. I first tried adding my own username with no luck. Next I tried root#localhost after reading here on SF. Then finally, I tried with username as just: root and it worked. Install was not very intuitive. Anyways, I hope this helps someone else.

MySQL - Restarted laptop and all databases are gone?

I use MySQL 5.6 on a Windows 7 Laptop. I restarted my laptop, came back on and for some reason it wasn't started. So I went to command prompt and restarted it (as it's not a service) only to find out my MySQL user got deleted?
Basically it's like my old MySQL user is just gone, 1. All my databases are gone which is weeks of work (as well as my database backups) 2. My root user doesn't have a password anymore?
Anyone know what's going on? Can I get my databases back? It wasn't a version upgrade or a laptop upgrade. I simply restarted my laptop as it was lagging a bit.
Anyone any ideas? Cheers.
Referred to your comments:
Yes you have the folder but it is hidden.
Type win+R or click run from start menu. And type : c:\programdata\ type enter and open mysql\data folder.
Probably you will find your data in this path.
EDIT :
Copy the Data folder safe place first. And then remove all mysql and all related files. Perform clean install. And replace your existing data folder to new one. That's all.

MySql move databases, new installation OSX Mavericks

Recently I made a clean install of OS X Mavericks, and right now i have setup ok mysql,phpmyadmin and apacheserver is running without problems.
PhpMyadmin as i was sure it will be, has no databases.
The databases are located in another disk installation from MountainLion that i was running before.
I understand that i can login PhpMyAdmin and export those databases in .sql one by one but there are a LOT,so i was wondering if there is a faster method to access the files and move to the Mavericks disk.
I remember in another installation i was digging around and i found those databases in the disk but my problem was that they were directories and not just .sql files to copy/paste, and i think that i had permissions problems
By that time they were not many so i prefered to use standard method, export from phpMyAdmin and then import again in the other OSX installation.
I have root access for sql.
Basically everything is the same/carbon as the old installation of MountainLion (username,password etc) so i was wondering if i can copy/paste somehow method.
If permissions needs to be set correctly please advise.
Try out MySQL Workbench for exporting and importing databases:
Workbench
Features
You can connect to one database and fetch data directly from another.
Allthough DannyThunder answer can help a lot other users (and i will choose it as correct) i will go with what most of the devs suggest, to use mysqldump. Problem was that i thought i will not have access to old sql that is why i had to copy/paste somehow the folders, i have backup allready and i am in mavericks and currently restoring.
Backup (from another OS,server etc): mysqldump -u username -p -–all-databases > file.sql
Restore (to the new OS,server) : mysql -u username -p < file.sql
The others have given several good alternatives (I tend to use mysqldump as well), but I'll just point out that phpMyAdmin has no problem exporting multiple databases. Not sure why you think you have to do them one-by-one, but from the main page click Export; by default all databases are selected, you can use the "Custom - display all possible options" radio button to select certain databases only.

Mac OS X mySQL custom database path (MAMP PRO)

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.