-1

I bought VPS from Hostgator to download mysqlnd (because I used a lot get_result method) but they said that they will delete libmysql and will install mysqlnd and also it will be my responsibility to maintain mysqlnd (I have no experience to maintaining it yet).

I want to learn what I will lose when they delete libmysql? What are the cons of mysqlnd? Why is it hard to maintain mysqlnd?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Alex
  • 1
  • 4
  • 1
    MySQL and Microsoft SQL Server are two different things. Which one are you trying to use here? Also what's wrong with using PDO? – tadman Aug 22 '16 at 21:19
  • @tadman I use mysqli,I dont use PDO because it is slow a little bit – Alex Aug 23 '16 at 05:50
  • I don't know what you're doing with PDO that it's "slow". Can you define that better? – tadman Aug 23 '16 at 07:06
  • 2
    @tadman I bet he read it in one of these stupid "performance testing" answers here on SO and blindly trusted it – Your Common Sense Aug 23 '16 at 07:18
  • 1
    People need to try things before they believe the rumours. There's nothing wrong with PDO. If your queries are cripplingly slow because of a terrible schema, no database interface will save you, but it's easy to blame your driver. – tadman Aug 23 '16 at 07:21
  • 1
    If you pay for an unmanaged private server you're basically the sysadmin. You're responsible for everything (installing security updates, configuring stuff...) though being "virtual" you're at least not in charge of hardware issues. Mysqlnd is the least of your worries. – Álvaro González Aug 23 '16 at 07:23
  • @ÁlvaroGonzález can you give advice?Should I delete and write all my db codes on ll over the website or should I use mysqlnd?which one is better option? – Alex Aug 23 '16 at 07:55
  • Sorry if wasn't clear. What I mean is that you're about to manage an internet-facing computer. If you don't have the time and experience, you might want to try shared hosting. – Álvaro González Aug 23 '16 at 08:00
  • @ÁlvaroGonzález okay but I should use mysqli get_result but I cant do this on shared host plan because they didnt allow me install mysqlnd driver – Alex Aug 23 '16 at 08:53
  • This is why you better use PDO, as it works right even without mysqlnd. check this article and see yourself: https://phpdelusions.net/pdo/mysqli_comparison – Your Common Sense Aug 23 '16 at 09:13
  • You've already asked that in the question, please don't prompt for answers to anyone who makes a side note in a comment. – Álvaro González Aug 23 '16 at 09:22
  • @ÁlvaroGonzález all problem that link describe on mysqli I solved I admit that it is really hard to solve this problems but I solved and now it is really easy to use mysqli with mysqlnd for me I write as simple as DB::getInstance()->query($sql,'auto',$param_array); and it prepare bind automatically with very fast way.It taked from me a lot of time to improve this to there,why I need go back again and create all that stuff for a little bit slow PDO?thats why I want to use just mysqli but only problem with mysqli is get_result function which I used to everyting(with fetch_... methods) – Alex Aug 23 '16 at 09:58

1 Answers1

1

what I will lose when they delete libmysql?

Nothing.

What is the cons of mysqlnd?

Didn't you say yourself that you're using get_result all over the site? Is it not enough benefit for you?

Why is it hard to maintain mysqlnd?

It's not. There is nothing to maintain.

I don't use PDO because it is slow a little bit

Oh, that nasty rumor again.
However, if mysqli functions are wrapped in a good helper library, there is nothing wrong with it.
But in case either mysqli or PDO are intended to be used raw, right in the code without any intermediate wrapper, then for a programmer PDO is the only choice. Yet I have to admit that for a regular PHP user mysqli is better because resembles the only way for database interaction they learned once and for all.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
  • I working a lot on mysqli to fit my system(like dynamic binding params,easy intereaction with db) because I learned that PDO is slow.till now I I used mysqli and I created very easy way to interact with db but Now I see that my host is not allow use mysqlnd as default(I use it because I need get_result function and also fetch_.. functions) and then I bought VPS to root access,unfortunately I learned that if I install mysqlnd they said that you will delete libmysql and thats why everyting about it will be your responsiblity.Should I delete it and install mysqlnd or change all my codes? – Alex Aug 23 '16 at 07:52