11

i m try to install mysql-sever on debian (WD mycloud live)

i have tried everything i found on google but no success

/etc/php5/conf.d/mysqli.ini Dont exists

for install i used apt-get -f mysql-server mysql-client mysql-common

so far i have

mysql running

 PHP Version 5.4.11-1
 Linux WDMyCloud 3.2.26 #1 SMP Fri Dec 27 13:50:41 PST 2013 armv7l

 Additional .ini files parsed   
 /etc/php5/apache2/conf.d/10-pdo.ini, 
 /etc/php5/apache2/conf.d/20-apc.ini, 
 /etc/php5/apache2/conf.d/20-curl.ini, 
 /etc/php5/apache2/conf.d/20-pdo_sqlite.ini, 
 /etc/php5/apache2/conf.d/20-sqlite3.ini,
 /etc/php5/apache2/conf.d/include_path.ini

 mysql -- version -> mysql ver 14.14 distrib 5.5.35, for debian-linux-gnu (armv71) using readline 6.2

i installed webmin there i can see my mysql-server information, i have there

Path to mysqlshow command    - /usr/bin/mysqlshow
Path to mysqladmin command   - /usr/bin/mysqladmin
Path to mysql command        - /usr/bin/mysql
Path to mysqldump command    - /usr/bin/mysqldump
Path to mysqlimport command  - /usr/bin/mysqlimport
MySQL configuration file     - /etc/mysql/my.cnf

Mysql Unix socket            - /var/run/mysqld/mysqld.sock
Database files directory     - /var/lib/mysql
Alvaro Louzada
  • 433
  • 1
  • 6
  • 23

2 Answers2

15
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.

Source:

Community
  • 1
  • 1
okias
  • 386
  • 2
  • 9
  • @okias if i try this dont works WDMyCloud:~# apt-get install php5-mysql Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: isc-dhcp-client : Depends: isc-dhcp-common (= 4.2.2.dfsg.1-5+deb70u2) but 4.2.2 .dfsg.1-5+deb70u6 is to be installed php5-mysql : Depends: php5-common (= 5.4.4-14+deb7u8) but 5.4.11-1 is to be ins talled E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a s olution). – Alvaro Louzada Apr 24 '14 at 03:02
  • did you tried run `apt-get update && apt-get upgrade` before? – okias Apr 24 '14 at 03:08
  • Hi @okias yes i tried everything i found on google like first apt-get -f install apt-get update && upgrade - the problem looks like be relationed to this isc-dhcp-client i cant update this pack – Alvaro Louzada Apr 24 '14 at 13:26
  • Now throws: E: Package 'php5-mysql' has no installation candidate – trainoasis Mar 02 '20 at 17:39
  • For PHP 8.1 use `sudo apt-get install php8.1-mysql` – Marvin Ruciński Oct 28 '22 at 17:37
0

I encountered above issue while configuring 'phpmyadmin' for php5.7 and mysql@5 combination that was required for one of my old raspberry pi projects.

In my case when I tried the

sudo apt-get install php5-mysql

I got error -

E: Package 'php5-mysqli' has no installation candidate

The error also mentioned about the replacement packages,

Package php5-mysqli is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: php5-mysqlnd php5-mysql

I executed following and it worked for me.

sudo apt install php5-mysqlnd

Hope it helps.

Anmol Saraf
  • 15,075
  • 10
  • 50
  • 60