Page 1 of 1

connect to mysql from php

Posted: Mon Feb 11, 2013 10:05 am
by jond
Sorry, this is not a question directly related to my sonic account right now, but I'd like to know the host name used here to connect to mysql from php - need to try the same idea on my server for testing - not sure if php or mysql are configured properly to access each other from regular linux accounts or the general syntax is wrong.

This does not appear to work:

$dsn = 'mysql:host=localhost;dbname=database_name';

Thanks, jon

Re: connect to mysql from php

Posted: Mon Feb 11, 2013 10:19 am
by joemuller
Jon,

The databases are located on a different server from your web page. You can look up the information on how to connect by exploring the options in our Member Tools:
https://members.sonic.net/databases/manage/

I hope this is helpful to you.

-- Joe

Re: connect to mysql from php

Posted: Mon Feb 11, 2013 10:24 am
by jond
Never mind, sorry folks, the localhost name works just fine on my system - I had the database wrong - so very sorry :shock: