Okay, I just setup MAMP Pro on my Mac Pro. I think I have everything configured correctly, but I’m confused about the MySQL databases MAMP Pro creates. Don’t MySQL databases usually end with .sql?
I just located the MAMP Pro MySQL database I added and it ends with .opt, which means I can’t open it with Sequel Pro. What am I doing wrong?
MAMP does not create the db, you have to create/add it yourself with, for example, Sequel Pro. Once you do that the db then needs to be populated with tables and then data is added to those tables.
Todd
On Sep 28, 2012, at 12:23 PM, RavenManiac email@hidden wrote:
Okay, I just setup MAMP Pro on my Mac Pro. I think I have everything configured correctly, but I’m confused about the MySQL databases MAMP Pro creates. Don’t MySQL databases usually end with .sql?
I just located the MAMP Pro MySQL database I added and it ends with .opt, which means I can’t open it with Sequel Pro. What am I doing wrong?
You don’t ever open a MySQL database file, you interact with it through the MySQL server (mysqld to its Unixy friends). You have the MySQL server running on your Mac, and you connect to that server through a socket or an IP address. You’ll have to look at the configuration settings for MAMP Pro to determine which of these is appropriate. The .sql files you have seen in the past are “dump” files, a complete rendering of the structure and data of the database in a text file. They don’t do anything on their own, not until you load them into a database server and access them through that server.
Walter
On Sep 28, 2012, at 1:23 PM, RavenManiac wrote:
Okay, I just setup MAMP Pro on my Mac Pro. I think I have everything configured correctly, but I’m confused about the MySQL databases MAMP Pro creates. Don’t MySQL databases usually end with .sql?
I just located the MAMP Pro MySQL database I added and it ends with .opt, which means I can’t open it with Sequel Pro. What am I doing wrong?
Actually, being able to get into the MySQL database with Sequel Pro saved my butt a few times. I guess I’m just having a hard time wrapping my brain around all of this stuff.
I just managed to move the MySQL database from GoDaddy to my local development server. I downloaded a zipped file with the extension .sql, but when I imported it into MAMP Pro basically it was nothing more than a bunch of files with various extensions (.frm, .MYD, . MYI), which I’m assuming are data fields, placed in a folder, which bears the name of my database. Is that all MySQL databases are , a bunch of files in a folder?
Thanks Todd. I’m slowly figuring all of this stuff out. It’s really not that hard, just confusing—well, at least to a newbie.
I am really happy that I decided to take the time to setup a local development server. I was making some changes to the live website the other day and I’m lucky I didn’t screw it up, or lose some of the files. This will provide a big safety net, once I get it configured properly. Plus, I won’t have to wait to the wee hours of the morning to work on my sites.
What you have there is a zip of the MySQL database directory, which yes, is just a bunch of text-ish files in a specific directory and a specific structure. I would not do anything with these. Instead, go back to GoDaddy, and access your databases through phphMyAdmin. There, you will find an Export tab where you can choose the database(s) you wish to export, and a bunch of settings. Be sure to choose Structure and Data, and the rest you can leave at defaults. Save the export to a file, unless the databases in question are pretty small (hundreds of rows rather than thousands or millions). You will get a dump file with a .sql extension, which you can then import into the MAMP database server using Sequel Pro or even phpMyAdmin running on MAMP’s Apache.
Walter
On Sep 28, 2012, at 1:53 PM, RavenManiac wrote:
but when I imported it into MAMP Pro basically it was nothing more than a bunch of files with various extensions (.frm, .MYD, . MYI), which I’m assuming are data fields, placed in a folder, which bears the name of my database. Is that all MySQL databases are , a bunch of files in a folder?
Good point. I always use Sequel Pro so I forget about MAMP having phpMyAdmin built-in. So yes, Kelly, you can import through MAMP via phpMyAdmin. My mistake, I didn’t mean to lead you astray.
I just loaded the site and it’s working fine. The weird thing is I expected all of my Perch served data to have disappeared, since I haven’t updated the settings to the localhost, but it looks like all the served data is working. I take it that’s because Perch is referencing the live MYSQL database.
Without seeing your Perch config file, that’s hard to say. Some database server connections reference the server by its fully-qualified domain name, like db.example.com and use a full external connection to the database. If that’s how yours is set up, then you are hitting the original database directly. Others use a localhost connection, which means a connection to localhost (the same server as the Web server process) over the internal-only IP address 127.0.0.1. If that’s the case, then you are hitting the database running under MAMP.
Walter
On Sep 28, 2012, at 2:29 PM, RavenManiac wrote:
Thanks guys.
I just loaded the site and it’s working fine. The weird thing is I expected all of my Perch served data to have disappeared, since I haven’t updated the settings to the localhost, but it looks like all the served data is working. I take it that’s because Perch is referencing the live MYSQL database.
Yep, that’s what it was. My only problem now is I can’t get Perch to connect to the local database. I have something configured wrong, but I just don’t know what. Here are my local settings.
On Sep 28, 2012, at 2:13 PM, “RavenManiac” email@hidden wrote:
Yep, that’s what it was. My only problem now is I can’t get Perch to connect to the local database. I have something configured wrong, but I just don’t know what. Here are my local settings.
So, now that I have my local development server setup, all I need to do when uploading a Perch enabled website is change my configuration file and move all of the updated files to the live server. Is that correct?
Don’t upload the config. file, there’s no need. Remember to export the local db and import it into the remote server and upload any site files that may have been changed. That should do it.
On Sep 28, 2012, at 2:21 PM, RavenManiac email@hidden wrote:
So, now that I have my local development server setup, all I need to do when uploading a Perch enabled website is change my configuration file and move all of the updated files to the live server. Is that correct?