greenworld Posted December 21, 2005 Posted December 21, 2005 Hello everybody; I am little confused now, appreciate it if I can get some help. We have a web site that has been hosted by total choice close to 3 years, I have a database and some pages of website working fine with this DB, Certain things I can not remember on setting the user for database since I did it about 3 years ago, What I wanted to do make another database for a newsletter, just experimenting with different free script, on control panel, I did click on "MySQL Databases" and in the area made a DB, and then add a new user , and set the user to the new DB , now going to set up the newsletter, on setting page, the program can not log in, in another word it does not recognize the user id and pass, I double checked the new user id and new database match. So I turned around and used the user id and pass of the old DB for new DB as well, Now go to the newsletter setting page, page comes up and works fine. I did not understand why this thing does not work with new user. What I did, change the user id and pass of old DB just set it to a new id, right in "MySQL Databases" area and also put the new id and pass in the config file and upload it to the site, Go to browser and load the page, my old page does not populate data out of DB, So opened the config file again and put the old id and pass back save it, upload it and now the my old page works fine, but in MySQL Databases area the old DB has different user than in config file, because I did not put the old user to the old DB back. There is no connection problem right now, But what am I missing here? Why I can not make it work for new user? Thanks for clearing this up for me. Quote
TCH-Andy Posted December 21, 2005 Posted December 21, 2005 Hi, Are you adding your cpanel username on the front of the database name, and the username when trying to call it from the script (you need to). ie, it should be database = cpanelusername_dbname user = cpanelusername_user pass = password Quote
greenworld Posted December 21, 2005 Author Posted December 21, 2005 (edited) Yes, I have the user_ before userid and database name, but I won't work, just another thing , I am now experimenting with different script, this time i can not log into admin for setting of script. this is the error: Database error: Invalid SQL: SELECT * FROM settings WHERE settings_name = 'administrator_password' AND settings_value = '21232f297b57a5b743894a0e4a801fc3'MySQL Error: 1146 (Table 'myidOfCpanel_respond.settings' doesn't exist) Session halted I did make a database called "respond "and add a user to it as well,and here is how it looks like in the global confing file of the script : <?php // Database conection parameters (need to be global) $Host = "localhost"; $Database = "myidOfCpanel_respond"; $User = "myidOfCpanel_manoo"; $Password = "jeep"; // URL of usubscribe script (without parameters) $SelfPath = "http://www.mywebsite.com/responder/"; ?> thanks for any help; Edited December 21, 2005 by greenworld Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.