Extension mysqli is missing, phpmyadmin doesn't work

痞子三分冷 提交于 2019-11-26 02:55:54

问题


I have a problem with phpmyadmin on ubuntu 12.04. I have already installed apache2, php5, mysql and phpmyadmin.

The phpinfo(); script, don\'t show nothing about mysqli or mysql extension.

When I try start phpmyadmin this error appear:

----
**phpMyAdmin - Error**
-------
**The mysqli extension is missing. Please check your PHP configuration.**
----

In the php.ini file, I uncommented extension=mysql.so line, but doesn\'t work...

Anyone have another posible solution?


回答1:


Latest phpMyAdmin versions require mysqli extension and will no longer work with mysql one (note the extra "i" at the end of its name).

sudo apt-get install php5-mysql

Will install package containing both old one and the new one, so afterwards all you need to do is to add

extension=mysqli.so

in your php.ini, restart apache and it should work.




回答2:


sudo apt-get install php5-mysql
sudo apt-get install php5-mysqlnd 

try both of alternatively it works for me




回答3:


If you run PHPMyAdmin on localhost uncomment in file /etc/php5/apache2/php.ini this line:

mysqli.allow_local_infile = On

Restart Apache:

sudo /etc/init.d/apache2 restart



回答4:


Just restart the apache2 and mysql:

  • apache2: sudo /etc/init.d/apache2 restart

  • mysql: sudo /etc/init.d/mysql restart

then refresh your browser, enjoy phpmyadmin :)




回答5:


I tried a lot of the answers and none of them seemed to work because php7.0 is not the default.

sudo apt-get upgrade

seemed to do the job for me but I had to reinstall php7.0 and phpmyadmin after that:

sudo apt-get install php7.0 php7.0-mysql
sudo apt-get install apache2 apache2-mod-php7.0
sudo apt-get install phpmyadmin

Hope it helps!




回答6:


I solved this problem by editing /usr/local/zend/etc/php.ini.

(found it by doing netstat -nlp ¦ grep apache, then strace -p somepid ¦ grep php.ini).

At the end of the file, I added:

extension=/usr/lib/php5/20090626+lfs/mysql.so
extension=/usr/lib/php5/20090626+lfs/mysqli.so
extension=/usr/lib/php5/20090626+lfs/mcrypt.so

Adding it without the path did not work.

Then after a restart it worked.




回答7:


Checking the extension_dir is one of the thing you like to check from phpinfo().In my case it was extension_dir = "./" by default which was wrong. Change it to extension_dir = './ext/' or where all your extension dlls are currently residing.




回答8:


For ubuntu user open your terminal and type following command

sudo apt-get install mysql

After that just restart apache2 by typing this

sudo service apache2 restart 

refresh you browser and enjoy phhmyadmin




回答9:


This worked for me , make a database with a php and mysql script and open up the mysql console and type in create user 'yourName'@'127.0.0.1' and then type in grant all privileges on . to 'yourName'@'127.0.0.1' then open up a browser go to localhost and a database should been made and then go to your phpmyadmin page and you will see it pop up there.




回答10:


at ubuntu 12.04 i had to change mssql.compatability_mode = On. put On and works




回答11:


Since I had this problem following an upgrade, I just disable Apache2-php5

a2dismod php5

and activated php7

a2enmod php7

Hope it may help anybody!




回答12:


Just add this line to your php.ini if you are using XAMPP etc. also check if it is already there just remove ; from front of it

extension= php_mysqli.dll

and stop and start apache and MySQL it will work.




回答13:


THIS WILL WORK 100%

open php config file with notepad ,find the line:-

;extension=mysqli.dll

change it to

extension=mysqli.dll 

by removing the ';'

save it

then restart apache server ,it worked for me on win xp



来源:https://stackoverflow.com/questions/10769148/extension-mysqli-is-missing-phpmyadmin-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!