I created a table type CSV but in PHPMyAdmin was created table with type MRG_MYISAM.
I read https://dev.mysql.com/doc/refman/5.1/en/csv-storage-engine.html
To enable the CSV storage engine if you build MySQL from source,
invoke configure with the --with-csv-storage-engine option.
Is it possible other methods to include this type ? Maybe my.ini ....
In order to know what storage engines are available you can run the following query:
show engines
The output will look like this:
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| MyISAM | YES | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
As the documentation you've read explains, it's possible to decide on compilation time whether the MySQL binaries will include support for the CSV engine. If they don't, it's just not possible to use it. You cannot enable something that doesn't exist ;-)
Related
I have mysql 5.1.44:
mysql> show engines;
+------------+---------+
| Engine | Support |
+------------+---------+
| ndbcluster | NO |
| MRG_MYISAM | YES |
| BLACKHOLE | YES |
| CSV | YES |
| MEMORY | YES |
| FEDERATED | NO |
| ARCHIVE | YES |
| InnoDB | YES |
| MyISAM | DEFAULT |
I need to enable federated engine in mysql. How can I do it?
Edit /etc/my.cnf and in the [mysqld] section, add the line:
federated
It's equivalent to specifying --federated on the command line
I know the post is a little old, but it seems that many people are having issues with federated engines.
When the mysql binaries are installed via yum, you already have the HA (High Availability) plugins. You simply need to load the plugins within the mysql CLI.
Here is the basic process:
Start mysqld if it is not already started. Make sure 'federated' is NOT in /etc/my.cnf at this point.
EX: At this time, /etc/my.cnf will look like this from a standard YUM install....
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Log into the mysql CLI with root (or another account with sufficient privilege).
Type: show engines;
You should see no FEDERATED engine at this point, like this:
mysql> show engines;
+------------+---------+------------------------------------------------------------+--- -----------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--- -----------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)
--> END PASTE <--
To enable the federate engine, type the following:
install plugin federated soname 'ha_federated.so'
NOW, when you 'show engines' you will see the FEDERATED Engine, but turned off...
It will look like this:
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)
You can now safely add the line 'federated' to the /etc/my.cnf file like this:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
federated
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Restart mysqld (service mysqld restart, etc...)
After the restart, go back in to the mysql CLI.
Type 'show engines;'
You should now see the FEDERATED Engine available and with SUPPORT as YES.
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| FEDERATED | YES | Federated MySQL storage engine | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)
And you are done...go forth and create federate tables...
Good luck!
Beginning with MySQL 5.0.64, the
FEDERATED storage engine is not
enabled by default in the running
server; to enable FEDERATED, you must
start the MySQL server binary using
the --federated option. — MySQL Documentation
To use the --federated option in a configuration file drop the --.
Example
my.cnf
[mysqld]
federated
I was trying Foward Engineer in Workbench and this error appeared to me, so my solution was, Workbench -> Load your Model -> Mysql Model -> click in the table that was showing the error, and click on Edit, after that just change Engine to InnoDB.
MYSQL 8
I have installed MariaDB on my Debian but Archive Engine is missing.
Is there any way how to install Archive Engine?
I haven't file ha_archive in my /usr/lib/mysql/plugin directory
Try to install plugin using SQL shell.
MariaDB> INSTALL PLUGIN archive SONAME 'ha_archive.so';
Show Plugins
MariaDB> show engines \G
EDIT:
I have installed mariadb-10.x on ubuntu and ARCHIVE is by default enabled.
MariaDB> show engines \G
*************************** 7. row ***************************
Engine: ARCHIVE
Support: YES
Comment: Archive storage engine
Transactions: NO
XA: NO
Savepoints: NO
I fixed this by entering the following command in MariaDB by logging as a root user -
MariaDB [(none)]> INSTALL SONAME 'ha_archive';
Query OK, 0 rows affected (0.33 sec)
Check if it is installed -
MariaDB [(none)]> SHOW ENGINES;
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
9 rows in set (0.00 sec)
Hi I have a InnoDB has a default database which supports transactions.
But When I run transactions script for Mysql sql-benchmarking I get below error:
Testing server 'MySQL 5.5.29 0ubuntu0.12.10.1' at 2013-02-11 11:32:28
Test skipped because the database doesn't support transactions
show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
I have edited my.cnf adding default-engine Innodb. but still no luck.
The perl script is "test-transaction" in Mysql Sql bench...
###
### Test insert perfomance
###
test_insert("bench1","insert_commit",0);
test_insert("bench2","insert_autocommit",1);
sub test_insert
{
my ($table, $test_name, $auto_commit)= #_;
my ($loop_time,$end_time,$id,$rev_id,$grp,$region);
$dbh->{AutoCommit}= $auto_commit;
$loop_time=new Benchmark;
for ($id=0,$rev_id=$opt_loop_count-1 ; $id < $opt_loop_count ;
$id++,$rev_id--)
{
$grp=$id/$opt_groups;
$region=chr(65+$id%$opt_groups);
do_query($dbh,"insert into $table values ($id,$rev_id,'$region',$grp,0)");
}
$dbh->commit if (!$auto_commit);
$end_time=new Benchmark;
print "Time for $test_name ($opt_loop_count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
}
I've installed mysql 5.1.49 on Ubuntu. I've added the following line to the end of /etc/mysql/my.cnf
default-storage-engine=innodb
I've restarted the mysqld process, then run
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
As you can see MyISAM is still the default, what am I missing? I've also run
sudo find / -name 'my.cnf'
to verify that there is no other my.cnf file present on the system
It's probably in the wrong section of the my.cnf file.
You need to set that variable in the [mysqld] section. If you put it at the end of the config file, it's probably in a different section, since [mysqld] is typically the first section, not the last.
Verify that you have put default-storage-engine=innodb in the appropriate [group], usually [mysqld].
I am having problems trying to use a different MySQL database engine. (I want to change from MyISAM to InnoDB)
/etc/my.cnf
[mysqld]
bind-address = 127.0.0.1
default-storage-engine=InnoDB
It appears that it is not installed? If that is true, how can I install InnoDB?
mysql> show engines;
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)
I am on Mac OS 10.5 and I am using MySQL version 5.1.35.
See here
http://dev.mysql.com/doc/refman/5.1/en/pluggable-storage.html
You'll need to locate download the appropriate build of the InnoDB plugin.