MyBB Community Forums

Full Version: [no answer?] connect to new database... SQL Error:1045 (change password, etc ? )
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Moved /forum from one /domain/public_html/ to another /domain/public_html with same host.
After imported the original database and moved the original /forum, and edited /inc/config.php...

Quote:$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'domainname_forum';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'domainname_forum';
$config['database']['password'] = 'q4cStP42n6';

Also updated /inc/settings.php.
But when try to open forum, get...

Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1045 - Access denied for user 'domainname_forum'@'localhost' (using password: YES)
Query:
[READ] Unable to connect to MySQL server

Couple questions...

1. At $config['database']['username'] = 'domainname_forum'; , is it the forum database tablename or the actual database username that should be entered ?
For example, directions at http://mcompute.co.uk/showthread.php?tid=479 (which seem to be helpful) indicate the tablename should be entered.

2. The original forum/database password (ie $config['database']['password'] = 'q4cStP42x6'; ) appears to 'encrypted' (ie its not the actual database user password).
So, is the password required to be encrypted, and if so, how to find/do that ?
And is it the database user password or maybe the forum admin password thats needed ?

Help ?
Other thoughts on the problem ?
Quote:1. At $config['database']['username'] = 'domainname_forum'; , is it the forum database tablename or the actual database username that should be entered ?

That would be the database user.

Quote:2. The original forum/database password (ie $config['database']['password'] = 'q4cStP42x6'; ) appears to 'encrypted' (ie its not the actual database user password).
So, is the password required to be encrypted, and if so, how to find/do that ?

There's no encryption, that's the password.

Quote:And is it the database user password or maybe the forum admin password thats needed ?

The database user's password.
Thank you very much for the reply !
Am thinking Im confusing myself Undecided
So, for config.php I should use the following?...

Quote:$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'domainname_databasename (name of database exported from original forum database)';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'domainname_databasename (or should this be databaseusername, or the forumname)';
$config['database']['password'] = 'q4cStP42n6 (password from original config.php for moved original /forum)';

How/when is the above ['password'] created, and should it work with the relocated /forum and imported database ?

Ive tried several combinations of the 'names' at config.php and still getting the same error 1045.

Obviously have not tried the right combination, unless this is not the main reason for the error 1045 ?

There are a couple database users (usernames?), created with MySQL for the database, but not sure how that might relate to the database password, if at all.

Please let me know if that helps clarify the remaining question/s or not, and sorry for any confusion.

Thanks again for your help !

(2014-02-10, 11:22 PM)Nathan Malcolm Wrote: [ -> ]
Quote:1. At $config['database']['username'] = 'domainname_forum'; , is it the forum database tablename or the actual database username that should be entered ?

That would be the database user.

Quote:2. The original forum/database password (ie $config['database']['password'] = 'q4cStP42x6'; ) appears to 'encrypted' (ie its not the actual database user password).
So, is the password required to be encrypted, and if so, how to find/do that ?

There's no encryption, that's the password.

Quote:And is it the database user password or maybe the forum admin password thats needed ?

The database user's password.
Quote:How/when is the above ['password'] created, and should it work with the relocated /forum and imported database ?

Usually you create it in your host's control panel. As long as you're still using the same host, the credentials will remain the same.

As you seem a little lost with this, contacting your host may be a good idea. They should be able to sort it out for you.
Nathan
Thanks again for the reply.
Below is the info back from HostMantis about the question.
They have basically thrown it back into my lap(top). Blush
If you could take a moment to look at the info that would be great.
Im at the point where I am thinking it might/would be easier to just recreate the forum.
But the question still seems like it could/should be answerable for future attempts at forum moves ?
Thoughts ?

(2014-02-11, 01:11 PM)Nathan Malcolm Wrote: [ -> ]
Quote:How/when is the above ['password'] created, and should it work with the relocated /forum and imported database ?
Usually you create it in your host's control panel. As long as you're still using the same host, the credentials will remain the same.
As you seem a little lost with this, contacting your host may be a good idea. They should be able to sort it out for you.

Quote:Support
Per your reply below, the downloaded (original forum with /scnbb/inc/config.php at the adaadaptable.com server location) database name was adaadaptable_scnbb1, as noted.
I changed it to akmblog_scnbb1, for the new akmblog.org server location
Are you suggesting it should be left as adaadaptable_scnbb1 ?
Thanks again for your help.
Alan
Ps: Btw, tried the adaadaptable_scnbb1, but still get "SQL Error:1045 - Access denied..." Guess Ill take your info back to the MyBB staff ?

Hello,
In "MySQL Databases" in your cPanel, we see the following database:
akmblogo_scnbb1
If that is the database you imported the database to, then that is what you would enter: "akmblogo_scnbb1"
As for the database user and password, that depends on which user you added to this database.
All in all, this is not a hosting issue, this is a setup/config issue on your end.
Thank you,
HostMantis Support
[email protected]
02/11/2014 17:26
HostMantis || Staff
Hello,


> Support
> Quote:
> "You should be exporting the database in phpMyAdmin from the old database and
> then creating a new database and user in cPanel in "MySQL Databases" on the new
> and then import the database .sql into the new one and then set your database
> configuration settings accordingly in /inc/config.php."
>
> Actually, thats exactly what I did.
> And the settings at the imported (from the adaadaptable.com domain and uploaded
> to the akmblog.org domain) config.php were...
>
> $config['database']['type'] = 'mysqli';
> $config['database']['database'] = 'adaadapt_scnbb1';
> $config['database']['table_prefix'] = 'mybb_';
>
> $config['database']['hostname'] = 'localhost';
> $config['database']['username'] = 'adaadapt_scnbb1';
> $config['database']['password'] = 'q4cStP42n6';
>
> I assumed the domain name needed to be changed to akmblog_ ?
> The rest I left the same.
> What is not correct ?
> I guess the other question may be, does the error message (below) definitely
> relate to the config.php settings question ?
> Please, let me know your opinion on the above question/s and, if necessary, I
> will again take it back to the MyBB forum Staff person.
> Thanks again.
> Alan
>
> Quote:
> MyBB has experienced an internal SQL error and cannot continue.
> SQL Error:
> 1045 - Access denied for user 'domainname_forum'@'localhost' (using password:
> YES)
> Query:
> [READ] Unable to connect to MySQL server

>
> Support
> Reply, [akm]... , embedded in your ----reply/s below...
>
> Hello,
>
> 1. At $config['database']['username'] = 'domainname_forum'; , is it the forum
> database tablename or the actual database username that should be entered ?
> For example, directions at http://mcompute.co.uk/showthread.php?tid=479 (which
> seem to be helpful) indicate the tablename should be entered.
>
> ---This is the database user account. Database user accounts can be viewed in
> cPanel in MySQL Databases.
>
> [akm]... I used the http://mcompute.co.uk directions, but there were still some
> unclear suggestions... such as the password format question below...
>
> 2. The original forum/database password (ie $config['database']['password'] =
> 'q4cStP42x6'; ) appears to 'encrypted' (ie its not the actual database user
> password).
> So, is the password required to be encrypted, and if so, how to find/do that ?
> And is it the database user password or maybe the forum admin password thats
> needed ?
>
> ---This is the database user password. No it is not entered in your script
> encrypted. You would enter it as plain text.
>
> [akm]... It appears that, according to the MyBB staffer, that the 'q4cStP42x6'
> is the 'text' brought over to the new forum location in the config.php file, and
> should work with the database that was also exported/imported from the forum#1
> database ?
>
> ----If you are moving the database from an existing account, all of this
> database configuration info should be readily available in the database
> configuration file (/inc/config.php) for the original forum.
>
> [akm]... I moved the domain#1/forum and related database to under another
> (domain#2/forum), both hosted by HM, so at least the domain name needed to be
> changed at config.php.
>
> The current domain#2 inc/config.php, $config info is...
>
> $config['database']['type'] = 'mysqli';
> $config['database']['database'] = 'akmblog_scnbb1';
> $config['database']['table_prefix'] = 'mybb_';
>
> $config['database']['hostname'] = 'localhost';
> $config['database']['username'] = 'akmblog_scnbb1';
> $config['database']['password'] = 'q4cStP42n6';
>
> Does this look good to you per the http://mcompute.co.uk directions below...
>
> $config['database']['database'] = 'a216715_tablename';
> $config['database']['table_prefix'] = 'tablename_';
>
> $config['database']['hostname'] = 'localhost';
> $config['database']['username'] = 'a216715_tablename';
> $config['database']['password'] = 'p4a55w0rd';
>
> It is just interesting that the $config['database']['database']= is the same as
> the $config['database']['username']= ?
>
> Also, at inc/settings.php the following setting were updated..
>
> $settings['bburl'] = "http://www.akmblog.org/scnbb"; (ie scnbb the forum
> directory name, and scnbb1 the related database name)
> $settings['cookiedomain'] = ".www.akmblog.org";
>
> Does that all above look good to you.
> If not, is there anyway you can look at the subject cPanel to see whats up with
> the SQL Error:1045 error message ?
> Thanks again for your help.
> Alan
>
> Thank you,
> HostMantis Support
> [email protected]


HostMantis Support
[email protected]
02/11/2014 13:17
Alan Miller || Client
Support
Below is a copy of a thread I posted at MyBB forums, and url...
http://community.mybb.com/thread-150920-...pid1061409
on a question about moving a forum from one domain to another on the HM server/s.
The main question at Post:#1 and latest reply is at the bottom (Post:#4), and suggests contacting the host support.
Please advise, and thank you.
Alan
Maybe the question is... how to change the password for an imported database for use it at the 'new' config.php $config['database']['password'] = 'q4cStP42n6'; ?
Guess need to post in new thread ?