Database Error: Unable to connect to the database

安装joomla1.5.26中文版中出现错误提示
Database Error: Unable to connect to the database:Could not connect to MySQL
之前说重要提示:configuration.php 检测无法通过,发现没有configuration.php,修改configuration.php-dist为configuration.php,并且更改了权限为777 ,joomla目录拥有者为root:root ;lamp测试正常,html和php都能正确在 /var/www/html 目录下工作,没有域名,直接用的ip地址192.168.1.110 作为网站地址[test@kkk 15]$ ps aux|grep mysql
mysql 4463 0.0 0.1 6656 1212 pts/0 S 19:43 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 4557 0.0 1.5 144044 15096 pts/0 Sl 19:43
已邀请:

跑堂小2 - 冇钱;冇房子;冇成就。要吃饭;要住宿;要消费

赞同来自:

1.先创建Database
mysql create database joomla;
2.创建Database user,赋予权限
mysql grant all privileges on joomla.* to user@localhost identify by 'password' with grant option;
3.安装Joomla时填上 joomla , user 和 password 就行。

刘备曹操 - 古今多少事,都付谈笑中

赞同来自:

谢谢,等明天试试

刘备曹操 - 古今多少事,都付谈笑中

赞同来自:

我创建了用户并链接了改mysql数据库并赋予了相应权限-bash-4.1$ mysqladmin -u root -p create joomla
mysql GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO '×××'@'localhost' IDENTIFIED BY '×××';
Query OK, 0 rows affected (0.00 sec)

mysql FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql \q

apachectl restart

要回复问题请先登录注册