|
amy
|
 |
« on: August 26, 2001, 08:31:00 AM » |
|
what's the hostname for a MySQL database?
is it localhost? lunarpages.com?
[ August 26, 2001: Message edited by: amy ]
|
|
|
|
|
Logged
|
--Amy Armitage Lunarpages.com
|
|
|
|
Ted S
|
 |
« Reply #1 on: August 26, 2001, 04:35:00 PM » |
|
Mysql comes with upgraded accounts only. All informaiton on setting up databases, host names and database login names can be found throught the MYSQL link in your control panel.
|
|
|
|
|
Logged
|
|
|
|
|
amy
|
 |
« Reply #2 on: August 26, 2001, 04:49:00 PM » |
|
Perhaps i should be more specific. I have a paid account, and when i try to install a forum via MySQL i get a string of errors. I have tried using "localhost" or "lunarpages.com" as the hostname. I also get errors with my username and password. I have looked thru the FAQ and also the MySQL info and I don't see any solutions. Please give me some details Ted  I have created a databse with cpanel and a username for that database, and I have added the username to the database. In the config file of the forum I am installing I have used that username and database name and I get the warning below. eg. Warning: Access denied for user: 'flashy@' (Using password: YES) in /home/flashy/public_html/forums/install.php on line 4 Warning: MySQL Connection Failed: Access denied for user: 'flashy@' (Using password: YES) in /home/flashy/public_html/forums/install.php on line 4 Access denied for user: 'flashy@' (Using password: YES) Thx in advance
|
|
|
|
|
Logged
|
--Amy Armitage Lunarpages.com
|
|
|
|
Ice
|
 |
« Reply #3 on: August 26, 2001, 04:55:00 PM » |
|
Also having problems here. We're both just trying to set up the XMB forums lol. Tried to use gin.lunarpages.com for the db host since gin is the username of my paid account but I got this error instead.  Warning: Host '65.204.170.135' is not allowed to connect to this MySQL server in /home/gin/public_html/xmb/install.php on line 4 Warning: MySQL Connection Failed: Host '65.204.170.135' is not allowed to connect to this MySQL server in /home/gin/public_html/xmb/install.php on line 4 Host '65.204.170.135' is not allowed to connect to this MySQL server Someone help please? I rarely ask for help lol  [ August 27, 2001: Message edited by: Ice ]
|
|
|
|
|
Logged
|
|
|
|
|
amy
|
 |
« Reply #4 on: August 26, 2001, 05:03:00 PM » |
|
Ok and another error, when i go to myphpadmin i get this message
"Database mysql - table user Error MySQL said: You don't have enough rights to be here right now! Back"
when i added a table (with no comments or fieldnames)
"Error SQL-query: [Edit]
CREATE TABLE xmb_ ( ) MySQL said: You have an error in your SQL syntax near ')' at line 1 Back "
[ August 27, 2001: Message edited by: amy ]
|
|
|
|
|
Logged
|
--Amy Armitage Lunarpages.com
|
|
|
|
Ted S
|
 |
« Reply #5 on: August 26, 2001, 05:23:00 PM » |
|
Here's what you need to do to activate an sql database:
1) login to your control panel 2) click on mysql 3) add a new database. for example, add a database with the name 'test'. 4) if you receive a successful confirmation page, proceed, otherwise read the error. if it says you had no more available databases you will need to buy more, any other error should be posted here along with your username. 5) assuming your database was added, click your browser's back button and refresh the main frame. 6) you will now see the name of your database in the db: field but nothing in the users field. 7) create a new user for example username = user, password = password. 8) click your browser's back button and refresh again 9) you should now see your user (user) and your database (test) in the first drop downs and the action button 'add user' next to them. click this button 10) once again you should be taken to a successful or failure page. any failures should be reported here 11) your username is now set to work with your sql database. to find the exact login details click the back button again and refresh the main mysql page. you should now see a good amount of data telling you the connection string for perl/php/jdbc
This string can be used to have any script connect to your server. You may also use the format db: <YOURUSERNAME>_<YOURDBNAME> host: localhost user: <YOURUSERNAME>_<YOURDBUSER> pass: <YOURUSERNAME>_<YOURDBPASS>
If any of this confuses you or if you wish to do more advanced configurations, please review our manual. If you receive any errors after following these steps, please post them here.
[ August 27, 2001: Message edited by: Ted Sindzinski ]
[ August 27, 2001: Message edited by: Ted Sindzinski ]
|
|
|
|
|
Logged
|
|
|
|
|
Ted S
|
 |
« Reply #6 on: August 26, 2001, 05:25:00 PM » |
|
Just to elaborate on a specific point, your databse username and databse name are not simply the username and database name you pick, they are a subset of your account username.
For example if your username is 'tsindzin' and your sql username is 'ted' and your databse name is 'forums' your true sql username name will be as tsindzin_ted and your database name will be tsindzin_forums. This way if 3 people want the same usernames or database name there is no possible overlap.
[ August 27, 2001: Message edited by: Ted Sindzinski ]
|
|
|
|
|
Logged
|
|
|
|
|
Ice
|
 |
« Reply #7 on: August 26, 2001, 06:07:00 PM » |
|
Hmm I think I'm gonna use up my bandwidth allowance trying to fix this problem. ROFL  still trying.....  [ August 27, 2001: Message edited by: Ice ]
|
|
|
|
|
Logged
|
|
|
|
|
Ted S
|
 |
« Reply #8 on: August 26, 2001, 06:24:00 PM » |
|
After some testing it seems that mysql i working fine 90% of the time. for some reason certain php scripts are having prboelsmc onnecting through the standard sql socket. this error will be fixed asap.
|
|
|
|
|
Logged
|
|
|
|
|
amy
|
 |
« Reply #9 on: August 26, 2001, 06:33:00 PM » |
|
Ted, thanks for your detailed reply.
I did as u suggested and i get this:
Connection Strings
PHP $dbh=mysql_connect ("localhost", "flashy_amy", "<PASSWORD HERE>") or die ('I cannot connect to the database.'); mysql_select_db ("flashy_xmb");
Perl and JDBC connection strings are lookin' fine.
Mebbe MySQL isn't set up right for php.
|
|
|
|
|
Logged
|
--Amy Armitage Lunarpages.com
|
|
|
|
Ted S
|
 |
« Reply #10 on: August 26, 2001, 07:14:00 PM » |
|
Amy - I take it that using that connection string with php failed?
|
|
|
|
|
Logged
|
|
|
|
|
amy
|
 |
« Reply #11 on: August 26, 2001, 07:21:00 PM » |
|
My config.php was as follows:
$dbname = "flashy_xmb"; $dbuser = "flashy_amy"; $dbpw = "******"; $dbhost = "localhost"; $tablepre = "xmb_";
I got the following errors:
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/flashy/public_html/forums/install.php on line 4
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/flashy/public_html/forums/install.php on line 4 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Hope this info is what you're after. Thanks again for your help Ted.
|
|
|
|
|
Logged
|
--Amy Armitage Lunarpages.com
|
|
|
|
kastir
|
 |
« Reply #12 on: August 26, 2001, 07:25:00 PM » |
|
Hi Now even I have managed to find the right thread to post this in  I have the same problem, Im using the connection string supplied in the control panel: $dbh=mysql_connect ("localhost", "kastir2_kastir", "<PASSWORD HERE>") or die ('I cannot connect to the database.'); mysql_select_db ("kastir2_kastir"); and get the followin error when trying to load the page: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/kastir2/public_html/index.php on line 212 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/kastir2/public_html/index.php on line 212 Unable to connect to database. Seems like you are aware of the problem so hopefully it will be fixed soon, thanks for the fast response Kastir
|
|
|
|
|
Logged
|
|
|
|
|
Ted S
|
 |
« Reply #13 on: August 27, 2001, 01:13:00 PM » |
|
This problem should now be fixed for all php scripts. Please let me know if you have any other trouble connecting to sql.
|
|
|
|
|
Logged
|
|
|
|
|