Re: core 5 php mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/20/06, Derek Hopkins <derek.hopkins@xxxxxxxxxxxx> wrote:
Hi List

       Where can I find the right values to put in this piece of PHP code to
link to MySQL.  At the moment if Can't Connect

<?
$db_host = "localhost";
$db_user = "mysql";
$db_pass = "*****";
$db_name = "scan2";

$conn = mysql_connect($db_host,$db_user,$db_pass);
if (!$conn) {
 echo "Could not connect to MySQL server!";
 exit;
}

I have hid the real value of the PW I think it is   Where can I find the
values for each field on my system please.


hey,

I don't know whether you have created the database "scan_2" or not. If
you haven't then do this

at the command prompt or terminal type "mysql" it will take you to the
mysql prompt.

execute this command    at the mysql prompt
create database scan_2;  (don't forget the semi colon at the end of the scan_2)

the database is now created.

By default there is no password for root ( root is the superuser or
administrator in mysql)

You can set the password for the root
set password for root@localhost=password('yourpassword');

replace "yourpassword" with the password you want to give to the root user.


change the values in your configuration file

$db_host = "localhost";
$db_user = "root"
$db_pass = "yourpassword"
$db_name = "scan2";

You can download the mysql-query-browser to work on mysql database

or

http://www.phpmyadmin.net/

These are GUI through which you can work on mysql database.

For more information on mysql go to mysql site

www.mysql.com

Regards

Ankush Grover
http://dev.mysql.com/get/Downloads/MySQLAdministrationSuite/mysql-query-browser-1.1.18-1.i386.rpm/from/pick

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux