Re: core 5 php mysql

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

 



Derek Hopkins 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.         
> 
A couple of points. The first is that you should create a user to
use with the web scripts, and limit the privileges of that user.
Unless you are using something like phpMyAdmin, you probably do not
want the web user to be able to create new users or connections. If
your use does not require it, then do not let the user create or
delete tables/databases. In other words, give the user the minimum
access necessary for the application.

Now, if you have not changed the default configuration, then you
only have one user defined. The default configuration is set for
user root, from the same system as MySQL is running on (localhost)
with no password. You should read the MySQL documentation, or at
least install one of the GUIs for using MySQL. For a web-based
interface, I like phpMyAdmin. You may also want to get MySQL
Administrator.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-- 
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