jssom Posted October 21, 2011 Posted October 21, 2011 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 ?! Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 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? Quote
0 jssom Posted October 21, 2011 Author Posted October 21, 2011 yes i dont know uploaded the pages to my website so i have to make connect to my computer how to do that Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 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 Quote
0 jssom Posted October 21, 2011 Author Posted October 21, 2011 i know but its not in the same machine Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 i know but its not in the same machine Then replace localhost with the IP of the machine the MySQL server is running on. Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 only the ip and gonna work?! Sure, assuming you have the user and password correct as well. Quote
0 jssom Posted October 21, 2011 Author Posted October 21, 2011 ok thanks didnt aork but i think my acm is stupid u have a good 1? Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 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 ^^ Quote
0 jssom Posted October 21, 2011 Author Posted October 21, 2011 im not good at php but i can understand it Quote
0 dpbBryan Posted October 21, 2011 Posted October 21, 2011 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. Quote
Question
jssom
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 ?!
12 answers to this question
Recommended Posts
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.