Can't load '/mysql.so' for module DBD::mysql:
本帖最后由 nullbert 于 2011-05-13 17:32 编辑
刚把extmail-1 . 2 装好,又装了mysql-5.0.45,浏览器打开出现如下错误:
install_driver(mysql) failed: Can't load '/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: libmysqlclient.so.15: open failed: No such file or directory at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at (eval 13) line 3 Compilation failed in require at (eval 13) line 3. Perhaps a required shared library or dll isn't installed where expected at /var/www/extsuite/extmail/libs/Ext/Auth/MySQL.pm line 45
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
http://rypts.blog.163.com/blog/static/19293056200892335353166/
5,又提示BI connect('database=extmail;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock',
'extmail',...)failed: Can't connect to local MySQL server
vi /var/www/extsuite/extmail/webmail.cf
改:SYS_MYSQL_SOCKET = /tmp/mysql.sock
DBI connect('database=extmail;host=localhost;mysql_socket=/tmp/mysql.sock','postfix',...) failed: Access denied for user 'postfix'@'localhost' (using password: NO) at /var/www/extsuite/extmail/libs/Ext/Auth/MySQL.pm line 45
回复 6# nullbert
检查下postfix(mysql的)用户的密码是否正确
本帖最后由 nullbert 于 2011-05-18 18:33 编辑
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| lib |
| mysql |
| run |
| test |
+--------------------+
5 rows in set (0.30 sec)
没有extmail数据库,所以
mysql> create database extmail
但是这个新建的数据库是空的,没有用户表
mysql> Use extmail
Database changed
mysql> select user from user;
ERROR 1146 (42S02): Table 'extmail.user' doesn't exist
mysql> show tables;
Empty set (1.44 sec)
mysql> Use extmail
Database changed
mysql> create user postfix identified by '123456';
Query OK, 0 rows affected (0.40 sec)
mysql> select user from user;
ERROR 1146 (42S02): Table 'extmail.user' doesn't exist
mysql> quit;
mysql> Use mysql
Database changed
mysql> select user from user;
+---------+
| user |
+---------+
| postfix |
| root |
| root |
| root |
+---------+
4 rows in set (0.00 sec)
看样子用户表保存在mysql数据库的user表中
DBI connect('database=extmail;host=localhost;mysql_socket=/tmp/mysql.sock','postfix',...) failed: Access denied for user 'postfix'@'%' to database 'extmail' at /var/www/extsuite/extmail/libs/Ext/Auth/MySQL.pm line 45
楼主去extmail论坛找找看
http://www.extmail.org/
http://bbs.chinaunix.net/thread-766279-1-1.html
http://cndefu.blog.163.com/blog/static/59393188200821002724689/
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
生成mysql系统数据库
# /usr/local/mysql/scripts/mysql_install_db --user=mysql&
启动mysql服务
# /usr/local/mysql/bin/mysqld_safe --user=mysql&
http://www.linuxdiyf.com/viewarticle.php?id=88020
如果出现以下错误,
install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for
module DBD::mysql: libmysqlclient.so.12: cannot open shared object file: No such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at (eval 6) line 3
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /root/mysqlreport line 162
就做操作
#cp /usr/local/mysql/include/mysql* /usr/include/
#cp /usr/local/mysql/lib/* /usr/lib/ (64位的是lib64)
然后再重新安装DBD: DBD-mysql-4.005
http://www.yesadmin.com/351/136920/
# load lib
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
echo /usr/lib/mysql >> /etc/ld.so.conf
ldconfig #(无法执行,没有此命令)
具体到我,好象根据第一个方法就没有提示can not load mysql.so了,
是否是没有创建系统数据库的原因,
或者跟动态连接库没有关系??
本帖最后由 nullbert 于 2011-05-17 18:43 编辑
DBI connect('database=extmail;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock','postfix',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /var/www/extsuite/extmail/libs/Ext/Auth/MySQL.pm line 45
我 查看了我的EXTMAIL配置文件webmail.cf:
# if mysql, all relate parameters should prefix as SYS_MYSQL
#SYS_MYSQL_USER = db_user
#SYS_MYSQL_PASS = db_pass
SYS_MYSQL_USER = postfix
SYS_MYSQL_PASS =
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock