LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do i install apache php and mysql (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-install-apache-php-and-mysql-176256/)

ashokn 04-30-2004 04:21 AM

how do i install apache php and mysql
 
Hello,
I am new to linux. I have installed rh9. rh9 comes with apache 2.0.40 php 4.2.2 and mysql 3.23. I want to upgrade default version of (apache 2.0.40, php 4.2.2 and mysql 3.23) to (apache 2.0.49, php 4.3.6 and mysql 4).
I tried to install apache 2.0.49 and php 4.3.6 in usr/local directory. Both were working but when tried to run phpmyadmin it was giving me error can not connect to mysql database please check username password and host name and also it tried to locate mysql.sock file in /tmp folder. i configure hostname as "localhost" username as "root" and password as "" in the config.ini.php file. But still phpmyadmin is not working.

Please give me idea/ suggestion. Have I not installed apache 2.0.49 and php 4.3.6 ? or should i install all mysql also in /usr/local folder if yes then how should i install.What could be the problem and its answer.

I want to install php 4.3.6, apache 2.0.49 and mysql 4 on my system.

Thanks in you all
Bye

ac1980 04-30-2004 05:58 AM

I'm not familiar with RH, but I think to upgrade a package you use something like
Code:

rpm -U nameorpackage.rpm
It looks like the mysql server is not running. Are you sure apache or init starts it?

PS: please don't connect to mysql as root, there's no need to and it's dangerous, even on localhost. Maybe mysql even defaults to refuse any connection from root. Use your normal user name or (best) make a dedicated mysql user.

PolyPerception 04-30-2004 06:20 AM

If I understand correctly you have removed the old packages with "rpm -e apache/php/mysql.rpm" then you installed the new packages and they installed without error? yes?

So now you are attempting to get phpMyAdmin to work but you get an error and it says "Cannot connect to MySQL server". I am assuming that the rpm version doesn't set a default password so you have to set one yourself. To do this you enter this command:
Code:

mysqladmin -u root -h localhost password <password_Here>
After issuing that command in a shell, open the "config.inc.php" in the phpMyAdmin directory and enter the password around line 84 where it says:
Code:

$cfg['Servers'][$i]['password']      = '<password_Here>';
In theory this should all work. Also to clarify something the 'root' user on mysql is different then the 'root' user on your RH system, therefore also making the password different among other things.


All times are GMT -5. The time now is 06:39 AM.