I recently updated my server's database system from MySQL to MariaDB. After update, everything works well.
But, when I went to phpMyAdmin, the default charset and types are changed:
MySQL chareset and type info
At the end of this image, the default type was set to 'InnoDB' and charset was set to 'latin1_swedish_ci'. They were 'MyISAM' and 'utf8_general_ci' before. How can I revert my character set and type settings back, and how can I customize settings when I make new database?
When I looked at /etc/my.cnf and /etc/my.cnf.rpmnew, I couldn't find any settings related to DB type/charset.
2 Answers 2
"How can I revert my character set" :
ALTER TABLE myTable CONVERT TO CHARACTER SET "utf8";
"How can I revert my type": (MySQL Engine):
ALTER TABLE myTbale ENGINE=MyISAM;
"how can I customize settings when I make new database?"
In your my.cnf
default-storage-engine=MyISAM
Best Regards.
Max.
- You can change server's charset and collation by editing
my.cnf
file and restart MySQL server to have effect
http://dev.mysql.com/doc/refman/5.6/en/charset-server.html
- Now all your tables are of Engine type as InnoDB, if you are using MariaDB 5.6+ then it can support Fulltext search with InnoDB which is primary reason before v5.6 to use MyISAM table. Now, you can get rid of MyISAM tables You can have a look at this blog post http://www.mysqlperformanceblog.com/2013/07/31/innodb-full-text-search-in-mysql-5-6-part-3/ (You can refer part-1 and part-2) as well for better understaning why we should use InnoDB rather than MyISAM in v5.6
- You can specify charset and collation as you would like while creating a database, a session level setting always overrides global level settings. http://dev.mysql.com/doc/refman/5.6/en/create-database.html
Explore related questions
See similar questions with these tags.