Title: Error using wp-admin/install.php &#8212; Call to undefined function mysql_connect()
Last modified: February 8, 2017

---

# Error using wp-admin/install.php — Call to undefined function mysql_connect()

 *  Resolved [sittingpilgrim](https://wordpress.org/support/users/sittingpilgrim/)
 * (@sittingpilgrim)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/error-using-wp-admininstall-php-call-to-undefined-function-mysql_connect/)
 * I’m fairly new to WordPress – have experience with creating and editing blogs,
   but am looking to create a more detailed site with WP as CMS;
 * Install on local system using Apache 2.4/25, MySQL 5.7, PHP 7.0.14, WP 4.72 (
   system is also running SQL Server for another project; MySQL installation previously
   tested and functional), Windows 7; tried in Google Chrome & Firefox;
 * Launch of wp-admin/install.php generates the following error report in WP-DEBUG(
   paths edited):
    PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()
   in [..]\wordpress\wp-includes\wp-db.php:1568 Stack trace: #0 [..]\wordpress\wp-
   includes\wp-db.php(658): wpdb->db_connect() #1 [..]\wordpress\wp-includes\load.
   php(404): wpdb->__construct(‘root’, ”, ‘wpdev1’, ‘localhost’) #2 [..]\wordpress\
   wp-settings.php(107): require_wp_db() #3 [..]\Users\Tom\Projects\wordpress\wp-
   config.php(90): require_once(‘…’) #4 C:\Users\Tom\Projects\wordpress\wp-load.
   php(37): require_once(‘…’) #5 C:\Users\Tom\Projects\wordpress\wp-admin\install.
   php(36): require_once(‘…’) #6 {main} thrown in C:\Users\Tom\Projects\wordpress\
   wp-includes\wp-db.php on line 1568
 * —
 * Per [http://php.net/manual/en/mysqli.installation.php](http://php.net/manual/en/mysqli.installation.php):“
   the mysqli extension is enabled and uses the MySQL Native Driver by default”;
   Tried explicitly declaring it in PHP.INI, no luck;
    Fresh installation – no plug-
   ins or extensions other than that in WP; re-downloaded WP in case of some obscure
   source of error; Error occurs whether I create wp-config or let the setup program
   do it;
 * Any help appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/error-using-wp-admininstall-php-call-to-undefined-function-mysql_connect/#post-8788281)
 * You should double-check that the `mysqli` extension in installed and active, 
   because that’s what you shoudl be using by default.
 * The older `mysql` (without the `i`) have been depracated for years now, and have
   been removed in PHP7, which is why you’re seeing that error. After looking at
   the file WordPress will try and use `mysqli` first and if it isn’t available 
   it will fall back to the older `mysql`. That tends to suggest that you haven’t
   got the `mysqli` extension set up properly. Just do that, and it will all be 
   good to go.
 *  Thread Starter [sittingpilgrim](https://wordpress.org/support/users/sittingpilgrim/)
 * (@sittingpilgrim)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/error-using-wp-admininstall-php-call-to-undefined-function-mysql_connect/#post-8791029)
 * Thanks [@catacaustic](https://wordpress.org/support/users/catacaustic/) – this
   did the trick. When I said “Tried explicitly declaring it in PHP.INI”, I had 
   mis-typed the extension name do just ‘extension=mysqli.dll’ instead of the correct‘
   extension=php_mysqli.dll’. Now I get all the mysqli details in my phpinfo(), 
   and the install completed.
 * Now I can get to work!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error using wp-admin/install.php — Call to undefined function mysql_connect()’
is closed to new replies.

## Tags

 * [Install](https://wordpress.org/support/topic-tag/install/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [sittingpilgrim](https://wordpress.org/support/users/sittingpilgrim/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/error-using-wp-admininstall-php-call-to-undefined-function-mysql_connect/#post-8791029)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
