Taking mysql dumps is pretty straightforward, but what if you needed to take a dump excluding certain tables? For this, you have two options: 1. use the –ignore-table option: mysqldump -u username -p database –ignore-table=database.table1 –ignore-table=database.table2 > database.sql This works fine as long as you don’t have too much tables to exclude. 2. The second … Continue reading Taking MySQL dumps with a twist
Tag: mysql
A lot of times, developers are asked to export data from a MySQL database to hand over to a client. In most of the cases, when tools like phpMyAdmin are available, the data is exported through the web tool. But when no such tools are at hand, developers most likely turn to their developers skills … Continue reading Export directly from MySQL to CSV
MySQL and replication, it has always been a touchy subject. Overall, things work properly. Non the less, on a certain project, we experienced regular replication failures: Error ‘Can’t create table ‘db.temp_table’ (errno: -1)’ on query. Default database: ‘db’. Query: ‘CREATE TEMPORARY TABLE temp_table … Basically the errors clearly points out that the temporary MySQL table … Continue reading Mysql temporary tables and replication
A few days ago, I tried to make a backup using the mysqldump command and got the following error: mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES A quick workaround is to pass the –-single-transaction option to mysqldump: $ mysqldump –single-transaction -u user -p DBNAME > backup.sql … Continue reading mysqldump: 1044 Access denied when using LOCK TABLES
Like a lot of developers, I’ve been watching the movement of MySQL since it has been acquired by Oracle. Since the acquisition, a lot of MySQL forks have been created. Think of MariaDB and Drizzle. I’ve also been looking at PostgreSQL. Since long, I’ve wanted to start personal project using PostgreSQL. So I decided to migrate … Continue reading Migrate from MySQL to PostgreSQL
Just got my new MacPro this weekend. After installing my common applications, I had to install my development tools as well. These are the instructions to install MySQL 64-bit version on OS X Snow Leopard. First of all, note that we are going to install MySQL compiling from source. So make sure you have installed … Continue reading Installing MySQL on Snow Leopard
Finally, I found a nice solution for the RoR 2.2 MySQL problem. The initial problem was that the MySQL library isn’t bundled with RoR anymore, and you need to install it as a gem. No big deal at first, but we Leopard users are “plagued” with the fact that Apple has somewhat of an exotic … Continue reading Mac Leopard, ROR 2.2 and MySQL