Re: Connecting to MySQL
| From: | Andreas D. Landmark | Date: | Fri, 22 Jun 2001 13:59:46 +0000 |
| Subject: | Re: Connecting to MySQL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9737@lists.php.net to get a copy of this message | ||
At 22.06.2001 09:42, you wrote:
How can I connect to our MySQL server remotely. Ordinarily, we upload the same PHP application the same machine that runs MySQL too. So, I just access it using "localhost" in the mysql_connect( ) function, like:change the servername variable to the hostname of your database server and make sure that you are allowed to connect (either in mysql.db or mysql.user). btw. it's always a good idea to use a different topic than a subject just discussed.. -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then.mysql_connect($servername,$dbusername,$dbpassword);where $servername = "localhost"What if I want to access the MySQL server from my Win test machine that runs Apache?