夕口技術錄
專業上的小常識,備而用之~
Category Archives: PHPMyAdmin
[MySQL] – 更改密碼後,無法登入phpmyadmin
2009/09/15
Posted by 於 問題:
# ./mysql -V
./mysql Ver 14.7 Distrib 4.1.22, for unknown-linux-gnu (x86_64) using readline 4.3更改密碼後,無法登入phpmyadmin
但 commend 確可以?
解答:
問題在 編碼要使用舊式的
# rm -rf /usr/local/mysql/data/mysql/
#/usr/local/mysql/bin/mysqldump -uroot -p showdown
# /usr/local/mysql/scripts/mysql_install_db –user=mysql
# /usr/local/mysql/bin/mysqld_safe –user=mysql >/dev/null &
# /usr/local/mysql/bin/mysqladmin -uroot password new-password
#/usr/local/mysql/bin/mysql -uroot -p
> SET PASSWORD FOR ‘root’@’localhost’ = OLD_PASSWORD(‘新密碼‘);
[Mysql][PHP] – OLD_PASSWORD 問題
2008/12/18
Posted by 於 php(<=4.1.22)連mysql的library過舊,
會有OLD_PASSWORD的問題
會有OLD_PASSWORD的問題
無法直接換成新版的library
需重新compiler php並下–without-mysql
再以mysql.so 的extension方式掛上
php官方手冊
In PHP 4, the option --with-mysql is enabled by default.
To disable this default behavior, you may use the --without-mysql configure option.
Also in PHP 4, if you enable MySQL without specifying the path to the MySQL install DIR, PHP will use the bundled MySQL client libraries.
In Windows, there is no DLL, it’s simply built into PHP 4.
Users who run other applications that use MySQL (for example, auth-mysql) should not use the bundled library, but rather specify the path to MySQL’s install directory, like so: --with-mysql=/path/to/mysql. This will force PHP to use the client libraries installed by MySQL, thus avoiding any conflicts.
In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library bundled with PHP.
Although this MySQL extension is compatible with MySQL 4.1.0 and greater, it doesn’t support the extra functionality that these versions provide. For that, use the MySQLi extension.
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
2008/02/02
Posted by 於 Question :
執行 phpmyadmin 登入時出現 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
解析:
意為 php Can`t connect mysql.sock (在 /tmp 目錄下找不到 mysql.sock 這個程序)
解決方法:
方法一、 某些mysql安裝時將mysql.sock放在/var/lib/mysql/mysql.sock或者其他的什麼地方,你可以通過修改/etc/my.cnf文件來修正它
vi /etc/my.cnf
socket=/var/lib/mysql/mysql.sock -> socket=/tmp/mysql.sock
方法二、 ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
建議使用方法二
ps .
php.ini 文件中 mysql.default_socket =
如為空值意為預設值 /tmp/mysql.sock
近期迴響