Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-29-2016, 02:24 PM   #1
LQ Newbie
Registered: Dec 2004
Posts: 6

Rep: Reputation: 0
Question Install mysqli

I have a VPS with CentOS 7. I have all LAMP installed, but not mysqli (it's not showing under php -m | grep -i mysql). My php version is 5.5.36. If I do
#yum install php-mysqli
I get the error:
No package php-mysqli available.
Error: Nothing to do
How do I install the extension?
Old 06-29-2016, 03:52 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Originally Posted by Haniver View Post
it's not showing under php -m | grep -i mysql
That means it's not loaded but it may be installed in your system

Check in extension directory
php -i | grep extension_dir

Edit: maybe the package is php-mysql, not php-mysqli
Originally Posted by Davinken
On CentOS 6 php-mysqli has been already incorporated into the php-mysql RPM package.

Anyway not expert in Centos here, but web search engine is always useful

Last edited by keefaz; 06-29-2016 at 03:56 PM.
Old 06-29-2016, 04:20 PM   #3
LQ Newbie
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply.
php -i | grep extension_dir
extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20121212 => /usr/local/lib/php/extensions/no-debug-non-zts-20121212
That path is a directory that contains only three files:
What do I do with them?
Maybe I have mysqli installed as you say, but I don't know how to enable it. I can't find a reference that gives clear instructions on it. Can you help me on that?
Old 06-29-2016, 05:40 PM   #4
Doug G
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
mysqli should be included as part of the php-mysql package. There should be a mysqli.ini file in /etc/php.d/ which enables the extension in php.

Make a php page to run phpinfo() which will tell you for sure if php recognizes mysqli.

Also, centos7 installs mariadb as a plug-in replacement for mysql.
Old 06-29-2016, 06:02 PM   #5
LQ Newbie
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Doug G, I didn't try your solution because I found one on the web that worked:

To install mysqli using EachApache:

1. Login to WHM as 'root' user.
2. Either search for "EasyApache" or go to Software > EasyApache
3. Scroll down and select a build option (Previously Saved Config)
4. Click Start "Start customizing based on profile"
5. Select the version of Apache and click "Next Step".
6. Select the version of PHP and click "Next Step".
7. Chose additional options within the "Short Options List"
8. Select "Exhaustive Options List" and look for "MySQL Improved extension"
9. Click "Save and Build"


lamp, php5

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't get mysqli to work on Fedora 20 FooIsFood Linux - Server 1 05-28-2014 08:56 PM
Help me to disable mysqli in php kaviajan Linux - Server 1 09-25-2012 04:46 AM
The mysqli extension is missing. DeSouffle Linux - Server 1 08-31-2012 12:58 PM
[SOLVED] CentOS 5.5 mysqli support junust Linux - General 3 03-16-2011 10:09 AM
Trying to install MySQLi puppymagic Linux - Newbie 1 08-19-2010 03:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration