search
Homephp教程php手册我整理的一点关于MySQL4.1的经验

我整理的一点关于MySQL4.1的经验

Jun 13, 2016 am 10:25 AM
authoraboutpointandWillItidyofexperiencesolvemeetquestion

作者: Jeanx
[ 将自遇到的问题解决并和大家一起分享 ]
乱码问题:
在MySQL4.1的安装过程中有缺省character的设置在下图中有显示
如果您所在的服务器有没有选择缺省为GB则会使用UFT8就会出现乱码
或者
只要在你连到数据库后,先执行这句
mysql_query("Set Names uft8");
其中 uft8 可改成你需要的编码,e.g. gb2312 等
这个命令也可以用于 mysql 得命令行,从而可以显示正确的文字
连接数据库出现
-------------------------------------------------------------------------------------------
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
-------------------------------------------------------------------------------------------
由于MySQL 4.1版本开始密码的hash算法改变,所以连接数据库
时可能会出现Client does not support authentication protocol问题。
可以通过一下两种方法解决
其一:
mysql> SET PASSWORD FOR
-> some_user@some_host = OLD_PASSWORD(newpwd);
其二:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(newpwd)
-> WHERE Host = some_host AND User = some_user;


mysql> FLUSH PRIVILEGES;
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor