MySQLi or MySQL(PDO) when installing Joomla ?

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
joomiro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Apr 30, 2017 8:00 pm

MySQLi or MySQL(PDO) when installing Joomla ?

Post by joomiro » Wed May 24, 2017 9:48 am

Hi.

I am about to ask a stupid question, but I hope there are people that also have this issue and are afraid to ask such a stupid thing :)

Which database option is better to choose during Joomla! installation process? MySQLi ot MySQL(PDO)? Is the second option better and more SECURE, because of its prepared statements?

MySQL is deprecated. Does this mean that MySQL(PDO) will not work properly? (Why its not MySQLiPDO)

I can switch the options after installation, but will this cause problems with my site in the future?

This issue may sound stupid and not so significant, but for me is important to know which option to choose, especially if I will not be able to switch the options later without bad consecuenses.

Thanks for your time devoted and commitment in advance :) I appretiate every answer

User avatar
astridx
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Wed Mar 25, 2015 8:56 am
Location: Germany
Contact:

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by astridx » Wed May 24, 2017 10:00 am

You should use MySQLi.
Here you can finde more informations about this topic: http://php.net/manual/en/mysqli.overview.php
---
https://blog.astrid-guenther.de/
---
Don't push the river ... it flows by itself ...

joomiro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Apr 30, 2017 8:00 pm

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by joomiro » Wed May 24, 2017 10:08 am

Thanks for your quick reply @astrdix. But why? What's wrong with the PDO option up to you? The link you've posted gives definition for mysqli and pdo, but doesn't point which is better.

In fact I am asking this question in Joomla context? Not which is better in general (mysqli ot pdo) :)

User avatar
astridx
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Wed Mar 25, 2015 8:56 am
Location: Germany
Contact:

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by astridx » Wed May 24, 2017 10:23 am

Please use "mysqli" because this method is new, more powerful and safer. The I is standing for improved. You could also use "mysql" directly. There should not be an difference in the operation of Joomla!. You should easily can switch between settings.
But I have no experience in swithing between the settings.
---
https://blog.astrid-guenther.de/
---
Don't push the river ... it flows by itself ...

joomiro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Apr 30, 2017 8:00 pm

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by joomiro » Wed May 24, 2017 10:48 am

I think you don't get my question. There are 3 options: Mysql, Mysqli and MysqlPDO. I am asking about the difference between mysqli and mysqlPDO. I know that Mysql is deprecated as I mentioned it in mu question

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1685
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by fcoulter » Wed May 24, 2017 11:35 am

joomiro wrote:Hi.

I am about to ask a stupid question, but I hope there are people that also have this issue and are afraid to ask such a stupid thing :)
It is not a stupid question, you should not be afraid to ask.


Which database option is better to choose during Joomla! installation process? MySQLi ot MySQL(PDO)? Is the second option better and more SECURE, because of its prepared statements?
Both are secure.It is not a reason to choose between them. Insecurities tend to creep in if they are used improperly eg in a badly coded 3rd party extension. The solution is to be careful which extensions you use

MySQL is deprecated. Does this mean that MySQL(PDO) will not work properly? (Why its not MySQLiPDO)
No, MySQL and MySQL(PDO) are different PHP extensions.
I can switch the options after installation, but will this cause problems with my site in the future?
No, it should make no difference whatsoever. The point about the Joomla database drivers is that they provide a way for programmers to write database queries that should work on any supported database, regardless of the database type or the API used. From the point of view of a site owner these issues should be invisible.

The only time the choice might matter that I can see is if the PHP on your server did not include a particular extension, in which case it would force your choice.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

joomiro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Apr 30, 2017 8:00 pm

Re: MySQLi or MySQL(PDO) when installing Joomla ?

Post by joomiro » Wed May 24, 2017 12:03 pm

@fcoulter, thank you for the PERFECT and detailed answer. I appretiate your effort and time :)


Locked

Return to “Installation Joomla! 3.x”