MySQL client can even, PHP can not connect, ask for enlighten

Source: Internet
Author: User
Tags chop
It's supposed to be a card. After you shut down the remote connection for MySQL
Database clients can connect

PHP cannot connect




Reply to discussion (solution)

The error message didn't tell you?
Call to undefined function mysql_connect ()
An undefined function was called mysql_connect ()

You did not load the php_mysql extension, of course mysql_connect () is undefined

It's loaded, and I haven't changed anything else.

The remote port of MySQL should be reopened, but I don't know how to open it, who can tell me?

So you changed the wrong php.ini file
Available phpinfo () see where the php.ini is actually used

File address, yes.



I don't know if it's a good thing. Mobile connection csdn Good slow brush for a long while to brush out to kill me

Do you see any mysql in the phpinfo () results?

Do you see any mysql in the phpinfo () results?


There's mysqli no MySQL

Don't take it out of context, you're looking at the mysqli extension, not the MySQL extension

There's no MySQL.

My hands are cheap, chop hands and chop hands, don't talk to me.

The MySQL extension for PHP is not open
Extension=php_mysql.dll

The MySQL extension for PHP is not open
Extension=php_mysql.dll


You see the 2 floor I have, should just open MySQL remote connection on it, but I will not

You need to install Php_mysql or use mysqli to operate.
Because you are mysqli, it is recommended to use MYSQLI to operate.
Reference: http://www.cnblogs.com/siqi/p/3776577.html

You need to install Php_mysql or use mysqli to operate.
Because you are mysqli, it is recommended to use MYSQLI to operate.
Reference: http://www.cnblogs.com/siqi/p/3776577.html


The code is written, and then use Mysqli.
That doesn't really solve the problem.

Not solved yet?
Look at the #1 command window:
1. Your MySQL version is 5.5
2. Your MySQL is located in the system search path
You can try to remove the MySQL path in the system environment variable path, or insert the PHP path before the MySQL path
If it is MySQL5.6 this must be done, because PHP can not take advantage of the MySQL5.6 client, need to carry the client
You're probably the same thing right now.

This is also one of the reasons why php5.5 does not recommend using MySQL extensions

Thank you again.
has been resolved by overwriting PHP

Learn about ←_←

http://blog.csdn.net/u010189941 here have to configure MySQL to make PHP calls, suggest look!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.