List Info

Thread: Newbie question - Testing the connection between PHP and MySQL




Newbie question - Testing the connection between PHP and MySQL
user name
2006-05-23 17:40:51
Is there an easy way to test and make sure that my
configuration is
good between PHP5 and MySQL?

I am a newbie so if it can be explained in simple terms, I
would
greatly appreciate it.

Also, how do I set usernames and passwords in MYSQL so this
can be
passed in my PHP connection variable code?  If I have a
group of users
always reading/writing to the Database, is there a general
log in I can
use?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

Newbie question - Testing the connection between PHP and MySQL
user name
2006-05-23 17:51:34
after you install and configure your apache (or other server) for PHP5 and configure to acept mySQL, use the function:
mysql_connect("host","user","password");
to create a connection with the server.

example:
mysql_connect("localhost","root",";aBcDeFg") or die ("You cannot connect! try in few minutes");

in this example, the sentence or die() means that, when you have some problem, that will happend!

On 5/23/06, MS <gmail.com"> mscurtogmail.com> wrote:

Is there an easy way to test and make sure that my configuration is
good between PHP5 and MySQL?

I am a newbie so if it can be explained in simple terms, I would
greatly appreciate it.

Also, how do I set usernames and passwords in MYSQL so this can be
passed in my PHP connection variable code? ; If I have a group of users
always reading/writing to the Database, is there a general log in I can
use?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP & MySQL"; group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

Newbie question - Testing the connection between PHP and MySQL
user name
2006-05-23 20:11:00
You mentioned to use:

mysql_connect("host","user","p
assword");
to create a connection with the server.


example:
mysql_connect("localhost","root",&q
uot;aBcDeFg") or die ("You cannot
connect! try
in few minutes");

If I have MySql on a different server then my own pc, would
I use the
server name here instead of localhost?

Can I just let all users use root to read/write to the
database?  Is
the password to the database the one you enter in when you
are
installing MySQL?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

Newbie question - Testing the connection between PHP and MySQL
user name
2006-05-23 20:25:27
One other question related to this - does MySQL need to be
installed on
the same web server as PHP?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

Newbie question - Testing the connection between PHP and MySQL
user name
2006-05-23 20:41:46
"If I have MySql on a different server then my own pc, would I use the server name here instead of localhost?"
Use the server IP Address or Server Name (in this case, just if it is on the same network). If it is remote (in other network), put the IP Address on host parameter.

"Can I just let all users use root to read/write to the database?&quot;
Yes, you need this permitions to do some insert, update or delete in a database. You may use just one user, but it depends of the security of your system and users.

"Is the password to the database the one you enter in when you are installing MySQL?&quot;
Right!

"does MySQL need to be installed on the same web server as PHP?"
I think that it need to be installed on the same web server as PHP.

On 5/23/06, MS <gmail.com">mscurtogmail.com > wrote:

One other question related to this - does MySQL need to be installed on
the same web server as PHP?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP & MySQL"; group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )