How to Clone a MySQL Database. Useful for Development

You can also use mysqldump and mysqlimport to transfer the database. For large tables, this is much faster than simply using mysqldump. In the following commands, DUMPDIR represents the full path name of the directory you use to store the output from mysqldump.First, create the directory for the output files and dump the database:

shell> mkdir DUMPDIRshell> mysqldump --tab=DUMPDIR db_name

Then transfer the files in the DUMPDIR directory to some corresponding directory on the target machine and load the files into MySQL there:

shell> mysqladmin create db_name # create database
shell> cat DUMPDIR/*.sql | mysql db_name # create tables in database
shell> mysqlimport db_name DUMPDIR/*.txt # load data into tables

Do not forget to copy the mysql database because that is where the grant tables are stored. You might have to run commands as the MySQL root user on the new machine until you have the mysql database in place.

After you import the mysql database on the new machine, execute mysqladmin flush-privileges so that the server reloads the grant table information.

Source: MySQL :: MySQL 5.0 Reference Manual :: 2.19.5 Copying MySQL Databases to Another Machine

Currently the best way to make a clone of a database on the CALI dev environment. Useful as a aid to development allowing the developer to test new things out on copy of a db so if it goes wrong you can get back to where you were.

 

After 3+ Years Amazon RDS Cloud Database Service Achieves “General Availability”

The Amazon Relational Database Service (RDS) was designed to simplify one of the most complex of all common IT activities: managing and scaling a relational database while providing fast, predictable performance and high availability.
RDS in Action
In the 3.5 years since we launched Amazon RDS, a lot has happened. Amazon RDS is now being used in mission-critical deployments by tens of thousands of businesses of all sizes. We now process trillions of I/O requests each month for these customers. We’re seeing strong adoption in enterprises such as Samsung and Unilever, web-scale applications like Flipboard and Airbnb, and large-scale organizations like NASA JPL and Obama for America.

via Amazon Web Services Blog: Amazon RDS: 3.5 years, 3 Engines, 9 Regions, 50+ Features and Tens of Thousands of Customers.

As part of recent rebuild of Classcaster, I shifted the MySQL database for the system to Amazon RDS. I found the process of importing an existing database to be straight forward and was up and running in no time. Since it is just an instance of MySQL running in the Amazon cloud, I administer it as I do the other my other MySQL databases running on AWS EC2 instance using SQLyog on Mac and Windows and MySQL Workbench on Linux .

As far as performance goes, RDS seems a bit more responsive than the AWS EC2 hosted databases I run. It is important to note that it is possible to knock it over by overloading the connection pool . Logging and backups are handled well and access to these from the RDS dashboard is pretty good. Although I haven’t tried it yet, the features exist to scale the database as needed. I may take advantage of some of this if I decide to move our main databases to RDS.

Overall, I’d recommend RDS as a good way to get a database up and running quickly and to provide a stable backed for your systems.

 

I do like the latest version of Workbench, especially its real time monitor features, so I’m likely to move to it on all platforms.Powered by Hackadelic Sliding Notes 1.6.5
As I discovered while dealing with one of those way too frequent brute force attacks against WordPress.Powered by Hackadelic Sliding Notes 1.6.5

MySQL 5.6 Released, NoSQL Features Added

A lot has changed in the database market in the two years since the MySQL 5.5 release. For one, the rise in the popularity of NoSQL databases has escalated in recent years. The NoSQL trend is not one that Oracle is ignoring.

“SQL is a very flexible language that allows you to do a lot of things that are not possible through a direct NoSQL type approach,” Tomas Ulin, vice president of MySQL Engineering at Oracle told InternetNews. “So we’ve tried to join the best of both worlds with the full power of SQL to do complex queries and at the same time we’re introducing a NoSQL access type API.”

Oracle Releases Open Source MySQL 5.6 with NoSQL Features — DatabaseJournal.com

The NoSQL API will be available alongside traditional SQL access to the same database giving the admin a powerful option for data access without forgoing the existing code. It will be interesting to try this new feature and see what the community reaction is.

CourtListener.com – US Fed Appellate Court Alerts and Yet Another Legal Search Engine

A mention in the BeSpecific blog tipped me off to an interesting project called CourtListener.com. From the about page:

The goal of the site is to create a free and competitive real time alert tool for the U.S. judicial system.

At present, the site has daily information regarding all precedential opinions issued by the 13 federal circuit courts and the Supreme Court of the United States. Each day, we also have the non-precedential opinions from all of the Circuit courts except the D.C. Circuit. This means that by 5:10pm PST, the database will be updated with the opinions of the day, with custom alerts going out shortly thereafter.

The site was created by Michael Lissner as a Masters thesis project at UC Berkley School of Information.

A quick perusal of the site and its associated documents tells us that Michael is using a scraping technique to visit court websites looking for recently released opinions. Once found, the opinions are retrieved, converted from PDF to text, indexed, and stored. Atom RSS feeds are then generated to provide current alerts.

The site is powered by Python using the Django web framework and is open source, so you can download the code. The backend database is MySQL and search is handled by Sphinx. The conversion from PDF appears to be plain text. If you register on the site you can create custom alerts based on saved searches.

All in all CourtListener.com provides another good source for current Federal appellate court opinions. Be sure to check the coverage page to see how far back the site goes for each court. Perhaps the future will bring an expansion to more courts and jurisdictions.