I'm not following at all, so many others probably aren't either. What exactly are you trying to do?
As for the hostname, you can use localhost, your computer's name, your ip address, or 127.0.0.1. Any will work, but I recommend using localhost.
You have one computer running a webserver / PHP, and another running a SQL database of some kind, yes? Are they on the same intranet, or are they on different networks?
I'm trying to configure a php website, to access my database (so people can create accounts for a free service im providing). In the website source, im asked to place my database: Host, Username, Password, Port, Database Name, Database Type. I know everything, except Host and Username (wich are localhost/root in navicat).
Hope you understand what i want.
Thank you
Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: Invalid argument supplied for foreach() in /home2/onloanet/public_html/www/pirate-key/core/common.php on line 39
Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Forbidden
They are on different networks, one is mine (the one with the SQL Database) and the other is a paid host (the one running the website).
what i need, is to configure the website (in the paid host) to be able to connect to the database (my computer).
In Navicat (SQL GUI) i have a database, with the following "stats":
Host: localhost
Username: root
Password: ********
Port: 3306
well, i edited the conf. files in the php website, and i still have the same errors as before:
PHP:Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: Invalid argument supplied for foreach() in /home2/onloanet/public_html/www/pirate-key/core/common.php on line 39 Warning: mysql_query() [function.mysql-query]: Access denied for user 'onloanet'@'localhost' (using password: NO) in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152 Forbidden
if any of you know php, would you mind taking a look?
P.S. How do i change my root account, to an admin account, and what wont i be able to do?
Thank you
if, the php application configurations is right.. then, there are several things that might be causing the problem
a) If you have a router, it might not be forwarding the request to your computer
b) The port needed is not open on your machine (firewall)
c) Host wont let you connect to an external databases....
there might be other problems.. I'm not sure tho
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Warning: Invalid argument supplied for foreach() in /home2/onloanet/public_html/www/pirate-key/core/common.php on line 39
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/onloanet/public_html/www/pirate-key/core/dbsimple/Mysql.php on line 152
Forbidden
(if you know how to host php websites on a mac please tell me, it would make my life so much easier)
yellow$ which php
/usr/bin/php
yellow$ which httpd
/usr/sbin/httpd
well, i have the database in my computer, because it is connect to another db, and to other things (the database is not for the people to register in the website), also is easyer to manage. Unless i can host php in my home computer, i will have to use an outside host (if you know how to host php websites on a mac please tell me, it would make my life so much easier)
Thank you