Changing the default storage engine in MySQL
I am reading this tutorial from Philip Greenspun. He uses Oracle. He uses reference constraint. One commenter said that you can do that in MySQL only if you use InnoDB storage engine.
The default storage engine in MySQL is MyISAM. If you want to change it, there are quite a numerous ways to do that.
You can change what storage engine to use for a table.
You can change what storage engine to use for a session.
You can change THE DEFAULT storage engine so that whenever you create a new table, that default will be used.
To do the last, you need to edit the file /etc/mysql/my.cnf (in Ubuntu).
Under the [mysqld] add the following line as shown below!
[mysqld] default-storage_engine = innodb
And then restart the mysql:
sudo /etc/init.d/mysql restart
0 komentar:
Posting Komentar