php / doc-en

English PHP documentation
484 stars 724 forks source link

MariaDB support in documentation #3628

Closed robertsilen closed 1 month ago

robertsilen commented 1 month ago

Hello, any particular reason MariaDB is not mentioned or explained in any of the mysql extensions at https://www.php.net/manual/en/mysql.php ? I mean, that's what people are probably running in practise, right? Thank you for any comments on this.

This is part of my efforts I describe in my blog Improving MariaDB Support in Open Source Projects.

kamil-tekiela commented 1 month ago

Does it have to be? Where and why would you see it mentioned?

cmb69 commented 1 month ago

Anyway, this is not a doc-base, but a doc-en issue, so I' transferring.

robertsilen commented 1 month ago

Does it have to be? Where and why would you see it mentioned?

I was looking at (non-official) instructions on how to install MyBB, and it advised on installing MySQLi, and then later in the in instructions you could see the terminal was MariaDB. I know MyBB supports MariaDB, and I know many Linux run MariaDB by default, and I know MySQL and MariaDB are diverging, and I prefer MariaDB - so I was trying to figure out if also MySQLi support MariaDB, and the documentation doesn't mention anything about MariaDB. It's a bit odd that MySQLi's Wikipedia article says it supports MariaDB/MySQL/Percona, but the reference is another non-official instructions, again, not the official documentation.

So, could at least documentation for MySQLi and similar mention they support MariaDB to save time of the next person who wonders about this? Or is there a reason not to?

kamil-tekiela commented 1 month ago

We could do that, but I am not convinced this is a good idea.

I am not even sure if the documentation says anywhere that MySQL is supported. The only information I see is about the MySQL 5.1 features which is a bit ambiguous.

I can see how from the perspective of a novice this is a perfectly valid question. Maybe we should have a page dedicated to this topic in the PHP manual. The only thing I am worried about is whether we actually officially support these DB vendors. Right now, it works on the basis of the mutual adherence to the MySQL protocol. Is it a good idea to step out of this boundary and state which vendors are officially supported?

kamil-tekiela commented 1 month ago

Or we could say that PDO_mysql and mysqli use mysqlnd which adheres to the MySQL protocol and then list examples of vendors that implement it.

jimwins commented 1 month ago

Another example of a database server that uses the MySQL protocol is TiDB.

I think the best place to clarify that these extensions support the MySQL protocol and not just the MySQL Server, and mention these other servers, would be in reference/mysqlinfo/concepts.xml and reference/mysqlinfo/set.xml.

Reviewing all of the MySQL APIs to make them less tied to Oracle's MySQL Server would probably be a pretty large task.

robertsilen commented 1 month ago

Thanks @jimwins @kamil-tekiela , I can put together a PR to reflect the suggestions:

In /manual/en/set.mysqlinfo.php, i.e. /reference/mysqlinfo/set.xml add to the intro: "The extensions listed support the MySQL protocol. Examples of compatible servers are MariaDB Server, MySQL Server, Percona Server for MySQL and TiDB."

For /manual/en/mysqlinfo.concepts.php i.e. /reference/mysqlinfo/concepts.xml a whole section is needed? Perhaps something like the following would be enough to get started?

Section title: Examples of compatible servers The MySQL extensions support the MySQL protocol. Examples of compatible servers are:

kamil-tekiela commented 1 month ago

@cmb69 Do we have any rules about adding examples of external products like this? Has there ever been a precedent?

cmb69 commented 1 month ago

See e.g. https://www.php.net/manual/en/dba.requirements.php.

jimwins commented 1 month ago

Another one: ProxySQL, https://proxysql.com

A similar case of adding examples about 'external products' in the documentation is the installation instructions for different cloud providers.

robertsilen commented 1 month ago

I created a PR now. I hope I got the XML formatting right. As I originally intended, I included database servers as examples (MariaDB, MySQL, Percona, TiDB). I wasn't sure about ProxySQL as it isn't strictly a database server - it can of course be added.