求助phpphp mysql 连接数据库mysql的标识符号

(Carl互联网研发)
(坚韧的菜鸟)
第三方登录:PHP无法连接mysql - ThinkPHP框架
新部署的LNMP环境,PHP无法连接mysql。
PHP文件能正常执行,mysql也可以通过命令行进行连接。
PHP编译为:./configure&\
--prefix=/usr/local/php&\
--with-mysql=mysqlnd&\
--enable-mysqlnd&\
--with-gd&\
--enable-gd-native-ttf&\
--enable-gd-jis-conv&\
--enable-fpm&但当我使用mysql_connect('127.0.0.1','root','root')&or&die('连接失败');就提示错误信息Deprecated:&mysql_connect():&The&mysql&extension&is&deprecated&and&will&be&removed&in&the&future:&use&mysqli&or&PDO&instead&in&/web/pdo.php&on&line&3
Warning:&mysql_connect():&mysqlnd&cannot&connect&to&MySQL&4.1+&using&the&old&insecure&authentication.&Please&use&an&administration&tool&to&reset&your&password&with&the&command&SET&PASSWORD&=&PASSWORD('your_existing_password').&This&will&store&a&new,&and&more&secure,&hash&value&in&mysql.user.&If&this&user&is&used&in&other&scripts&executed&by&PHP&5.2&or&earlier&you&might&need&to&remove&the&old-passwords&flag&from&your&f&file&in&/web/pdo.php&on&line&3
ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。}

我要回帖

更多关于 php连接mysqli 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信