[dvlug] Need for Technical Assistance - Error problem connecting MYSQL to HTTP
Rick Moen
rick at linuxmafia.com
Sat Jan 2 15:13:25 PST 2010
Quoting harry strout (harry-strout at comcast.net):
>
> Hello to all.
>
> Happy new year to all.
>
> I have a question to ask. Perhaps someone can help me.
>
> I received this error message on a CentOS Linux computer after
> installing apache, mysql, and php:
>
> Cannot connect to mysql (Unknown MySQL server host 'http' (1))
You don't say where you 'received' that error. Maybe a Web page that
you were expecting to reach through the PHP interpreter to PHP's MySQL
access libraries and thus eventually to your local MySQL instance?
I suspect you're trying to throw together a LAMP server from distro
packages, and have a lot of testing and configuration ahead of you.
Also, you may not even have all the pieces you need installed, leaving
configuration aside for a moment. For example, you say you have "PHP"
installed, but does that even include the PHP MySQL access libraries?
Many distros put those in a separate package.
Suggest you start by attempting to verify that the MySQL database is up
and running by doing this sort of thing:
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14495
Server version: 5.0.51-3 (Debian)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)
mysql>
Here are some further suggestions about where to go after that.
http://dev.mysql.com/tech-resources/articles/mysql_intro.html
And yes, it's really frustrating working your way through LAMP setup
problems, especially if you've not had to wrestle SQL databases into
submission before.
More information about the dvlug
mailing list