Tuesday, March 25, 2008

Start PHP and Mysql in Fedora Core 3

Actually I studied how to open mysql in fedora linux in my last vacation time. But I haven't written it anywhere . That's why I had to go for searching it again.

If we installed every mysql package in Fedora Core 3, we would get one 'mysqld'. It starts mysql server demon.

For getting mysql prompt , execute /etc/init.d/mysqld start in shell prompt.

[root@localhost ~]# /etc/init.d/mysqld start

Starting MySQL: [ OK ].....

Execute mysql in shell prompt.

[root@localhost ~]# mysql

mysql > SHOW databases;

mysql > USE mysql;

mysql > SHOW tables;

PHP :-

We can embed php code inside HTML. I copied my php code in /var/www/html and started httpd - Apache Hypertext Transfer Protocol Server . Application --> System Settings --> Server Settings --> Services , tick httpd and click Start.

example 1:

< ?

phpinfo();

? >

save this code in /var/www/html as test.php

run http://localhost/test.php in mozilla. Then we will get the php installation details.

You can make changes in /etc/php.ini.

No comments: