Jump to content
  • 0

how to connect to mysql


jssom

Question

12 answers to this question

Recommended Posts

  • 0

hi

can i ask how can i connect to mysql on my computer

from the acc manager

var $host = 'localhost'; // host database DB

so it must be MyIp:localhost ?!

 

What exactly are you trying to do? Judging by the code that's PHP, do you not know how to connect to a SQL table with PHP?

Link to comment
Share on other sites

  • 0

http://php.net/manual/en/function.mysql-connect.php

 

If the MySQL server is running from the same machine as the PHP script is running from, localhost is fine, or 127.0.0.1

Link to comment
Share on other sites

  • 0

ok thanks didnt aork but i think my acm is stupid u have a good 1?

 

No, but I think you should take a step back and maybe look at the basics. PHP has built-in functions for communicating with MySQL, so if you're have troubles understanding this problem I think you need to do a bit more homework ^^

Link to comment
Share on other sites

  • 0

im not good at php but i can understand it

 

That's ok, you can see this as a learning experience :P

Just read some tutorials about how to connect to MySQL databases from PHP and make some small test programs. This'll also help you in the future to figure out problems such as this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...