You are here: Re: What is a DataSource(Connecting to MySqL)? « PHP SQL « IT news, forums, messages
Re: What is a DataSource(Connecting to MySqL)?

Posted by nobody on 08/22/06 02:26

Yep, I did replace the username and password with the actual MySqL UN
and PW. One of the administrators in the forum was kind enough to take a
look at my script. Waiting to hear back.

My ISP is CrystalTech.com. I checked their knowledge base for
assistance. Found an article on Connection Strings(see below) but it
shows the standard mysql_connect() format(which I used) and isnt all
that clear on how to use the generated Datasource string.

Hopefully the Administrator will see something in the PHP. Its funny how
nobody on the forum responded. I would have figured connecting to MySQL
from PHP was consistent. I can see that may not be the case from ISP to ISP.

Subject: Connection Strings For MySQL
Article #656

If needed, create a DSN (DataSource) by logging into the Control Center
at..... ....and from the menu item DATABASE clcik on DATASOURCE

Next, use one of the following connection string formats that
corresponds to the platform used in the code of the website.

PHP (DSNless):

$db = mysql_connect("mysql#.XXXXX.com", "user", "pass")

** Where mysql#.XXXXXX.com you would need to replace the # with the
number of your MySQL server which can be found from the menu item
DATABASE select MYSQL and click on MY SQL ADMIN in the Control Center





chrisv wrote:
> Quick question:
>
> who is your isp?
>
> some hosted/managed isps can have quirky database access rules. for
> instance, i have several bluehost.com accounts. when i use CREATE
> testdb from the command line, it is created on the bluehost 'localhost'
> server with no problem. but, bluehost appends a small string from your
> account name in front of my database name for their purpopses. so if
> my account name is happy_blue_host_client, my 'testdb' name becomes
> 'happy_blue_testdb". i didn't know this at first and got serveral
> script errors when i first opened my accounts. now its not an issue.
> so read your isp's documentation because there could be special rules
> for connecting to you mysql database.
>
> this may be obvious, but i have to ask because i assume nothing about
> you. did you replace 'username' and 'password' with the mysql username
> and password you assigned to your mysql database instance?
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация