`
sinykk
  • 浏览: 357011 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication

    博客分类:
  • php
阅读更多

( ! ) Warning: mysql_connect() [function.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 my.cnf file in D:\work3\testphp\testsinykk.php on line

 

解决方法:

 

SET old_passwords = 0;
UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1;
SELECT LENGTH(Password) FROM mysql.user WHERE User = 'testuser';
FLUSH PRIVILEGES;
分享到:
评论

相关推荐

    Linux源码安装MySQL+MySQL主从+Nginx+Nginx负载均衡+redis+php+phpredis+tomcat

    ./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir=/usr --...

    CentOS7下源码编译配置Apache2.4+MySQL5.6+PHP71

    ./configure --prefix=/usr/local/php7 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-...

    Apache2+MySQL5+PHP5安装手册

    MySQL是一种关系型数据库管理系统,用于存储和管理网站的数据。安装过程如下: ```bash # Ubuntu/Debian sudo apt-get install mysql-server # CentOS/RHEL sudo yum install mysql-server ``` 安装后,需要设置...

    centos7下部署apache2.4+mysql5.7.13+php5.6.pdf

    ./mysqld --initialize-insecure --user=mysql chown -R mysql:mysql /var/lib/mysql ``` 5. 启动、检查状态、停止和重启MySQL服务: ```bash systemctl start mysqld systemctl status mysqld systemctl ...

    mysql+php+nginx centos服务器配置

    MySQL是一个流行的关系型数据库管理系统,广泛应用于网站数据存储。在CentOS 6.2上安装MySQL,首先需要添加官方的Yum仓库,然后通过Yum进行安装: 1. 添加MySQL Yum源: ``` sudo rpm -Uvh ...

    Linux搭建PHP+MySQL+Apache环境

    在Ubuntu上,输入`sudo apt-get install mysql-server`,而在CentOS中则是`sudo yum install mysql-server`。安装后,通过`sudo mysql_secure_installation`进行安全配置,包括设置root用户的密码。确保MySQL服务...

    Linux+Apache+Nginx+Mysql+PHP完美配置教程

    # ./configure --prefix=/usr/local/php --with-config-file-path=/etc/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-...

    centos一键安装jdk+mysql+nginx+tomcat+php

    sudo rpm -Uvh /tmp/mysql80-community-release-el7-3.noarch.rpm ``` 2. 安装MySQL Server: ``` sudo yum install mysql-server -y ``` 3. 初始化数据库并设置密码: ``` sudo systemctl start mysqld ...

    Apache2.4.10+PHP5.4.23+mysql-5.6.10+Zend Guard Loader6)_20141027.docx

    pdo-mysql=mysqlnd --with-zlib --with-gettext --with-iconv --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xpm-dir --with-zlib-dir --with-bz2 --with-curl --with-mcrypt --enable-...

    linux下Apache+mysql+php(LAMP)安装包

    - **安装MySQL**:执行`sudo apt-get install mysql-server`(Ubuntu/Debian)或`sudo yum install mysql-server`(CentOS/RHEL),并设置MySQL root用户的密码。 - **安装PHP**:对于Ubuntu/Debian,运行`sudo ...

    LINUX下PHP+MYSQL+APACHE配置过程

    1. **安装MySQL**:同样通过包管理器进行,Ubuntu/Debian使用`sudo apt-get install mysql-server`,CentOS/RHEL使用`sudo yum install mysql-server`。 2. **初始化MySQL**:安装后,运行`sudo mysql_secure_...

    Linux下安装Apache+MySql+PHP全程演示录象(语音)

    4. **安装MySQL**:安装MySQL数据库,Ubuntu/Debian系统用`sudo apt-get install mysql-server`,CentOS/RHEL用`sudo yum install mariadb-server`(因为MySQL已被MariaDB替代)。安装后,别忘了设置root用户的密码...

    Nginx+PHP+Mysql+ECShop网站部署(新).docx

    MySQL数据库的安装和配置同样关键,因为ECShop是一个基于MySQL的电子商务平台。安装步骤通常包括: 1. 安装MySQL服务器及其客户端工具。 2. 初始化数据库,设置root用户的密码。 3. 创建新的数据库和用户,为ECShop...

    php.ini-development

    Please see the actual settings later in the document for more details as to why ; we recommend these changes in PHP's behavior. ; display_errors ; Default Value: On ; Development Value: On ; ...

    Linuxlighttpd+php+mysql+Discuz论坛.pdf

    MySQL是广泛使用的开源关系型数据库管理系统。安装MySQL并进行基本配置: 2.1 开始安装MySQL 使用包管理器安装MySQL Server: ``` sudo apt-get install mysql-server ``` 或 ``` sudo yum install mysql-server ``...

    linux + nginx + mysql + php 配置流程

    1. 安装MySQL Server:`sudo yum install mysql-server -y` 2. 初始化数据库:`sudo mysql_secure_installation` 3. 启动MySQL:`sudo systemctl start mysqld` 4. 开机启动MySQL:`sudo systemctl enable mysqld` ...

    nextcloud+centos7+mysql+nginx 搭建

    GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'yourpassword'; FLUSH PRIVILEGES; EXIT; ``` 记得替换'yourpassword'为你的密码。 安装并启动Nginx服务: ``` sudo ...

    在centos下安装nginx+mysql+php所需要的文件和扩展

    接下来,我们将安装MySQL,这是一个关系型数据库管理系统,广泛用于存储网站数据: ```bash sudo yum install mysql-server -y ``` 启动MySQL服务并设置开机启动: ```bash sudo systemctl start mysqld sudo ...

Global site tag (gtag.js) - Google Analytics