Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
322 views
in Technique[技术] by (71.8m points)

php - PDO and MariaDB

I've been using PDO in PHP for a while now utilizing MySQL.

However, recent developments have made me think that MySQL will start fading out in replacement of MariaDB especially since MariaDB:

  • Consider themselves many developer years ahead of MySQL without putting new developments into paid areas (clustering for example).
  • The majority of the main MySQL developers moved to MariaDB after Oracle took over.
  • Is becoming the default database to replace MySQL on various Linux distributions.
  • Is a drop in replacement of MySQL and large companies are starting to adopt MariaDB such as Wikipedia (Read the blog post here).

So my question is, since MariaDB doesn't appear to be listed in the PDO drivers and seeing as MariaDB is designed to be a "drop in replacement" and could potentially phase out MySQL in the future.

Can I use the MySQL PDO driver with a MariaDB database, at least until an official MariaDB driver becomes available?

Links

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

MariaDB and MySQL are 100% 99% compatible. This includes connector compatibility.

edit: up to the point that MariaDB tools are shipped as MySQL tools (e.g. mysqldump), and data files are binary compatible, too


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...