Jump to content

Configuring database in mt.cfg


newsbeak

Recommended Posts

I've been to several forums and it seems this is the only one that knows what they are talking about....

 

 

Ok I am getting this :

Got an error: Bad ObjectDriver config: Connection error: Access denied for user: 'beak@localhost' (Using password: YES)

 

This is what I have in my Mt.cfg file:

 

ObjectDriver DBI::mysql

Database newsbeak_com_blog

DBUser beak

DBHost localhost

 

And yes I have the PW in the correct file.... So what am I doing wrong? Can someone help me? :'(

Link to comment
Share on other sites

Welcome to the forum

Not mt user but there are many here that may help.

 

Database newsbeak_com_blog

DBUser beak

 

Are you on a shared host?

if so you may need to add your cpanel name in front of the database and user

like this

 

Database YourCpaneNname_newsbeak_com_blog

DBUser YourCpanelName_beak

Link to comment
Share on other sites

I've been to several forums and it seems this is the only one that knows what they are talking about.... 

Ok I am getting this :

Got an error: Bad ObjectDriver config: Connection error: Access denied for user: 'beak@localhost' (Using password: YES)

 

This is what I have in my Mt.cfg file:

 

ObjectDriver DBI::mysql

Database newsbeak_com_blog

DBUser beak

DBHost localhost

 

And yes I have the PW in the correct file.... So what am I doing wrong?  Can someone help me? :'(

 

First, is this problem occurring on an account hosted by TotalChoice Hosting?

 

Second, have you successfully run the mt-check.cgi? If so what were the results?

 

John

Link to comment
Share on other sites

Welcome to the forums, newsbeak! :)

 

TCH-Don's correct - many hosts require you to add your CPanel username plus an underscore ("_") to the Database and DBUser parameters in your mt.cfg file.

 

Another common cause of this error is to not remove the literal text 'database_password' from the mt-db-pass.cgi file - your password is the only text that should be in the file.

Link to comment
Share on other sites

The mt-check.cgi script is not that helpful, as the problems are either in the mt.cfg or the MySQL database, neither of which are examined by mt-check.cgi.

 

I'm seeing a number of issues with your mt.cfg file:

 

1) The mt.cfg file was not uploaded to the server in ASCII mode, so MT will not be able to read the mt.cfg file correctly. MT will not see any of your mt.cfg settings and will try to run with just the pre-programmed system default settings.

 

After editing the mt.cfg file on your local PC, you need to make sure your FTP program uploads the mt.cfg file to the server in ASCII mode.

 

2) There are two sets of database configuration settings in mt.cfg, both commented out:

 

a) At line 35 in mt.cfg:

># ObjectDriver DBI::mysql
# Database newsbeak_com_blog
# DBUser beak
#DBHost localhost

b) At line 507 in mt.cfg (at the end of the file):

># ObjectDriver DBI::mysql
# Database newsbeak_com_blog
# DBUser shanda
# DBHost localhost

There should only be one set of database settings in the mt.cfg file. I'd recommend deleting the settings added at the end of the mt.cfg file.

 

In order for MT to recognize any setting in the mt.cfg file, it must be uncommented (any "#" at the beginning of the line needs to be removed). The database settings ObjectDriver, Database, and DBUser need to be uncommented, and should look like the following (using the settings at line 35 as an example):

>ObjectDriver DBI::mysql
Database newsbeak_com_blog
DBUser beak
#DBHost localhost

3) The CGIPath setting in mt.cfg is not correct.

>CGIPath http://WWW.newsbeak.COM/mt/

URLs are case-sensitive - a URL such as this will usually cause problems. I'd suggest changing this setting to the following:

>CGIPath http://www.newsbeak.com/mt/

4) mt.cfg file should be protected from viewing in a browser.

 

Anyone can view your mt.cfg file (as I did) if they know the URL to your mt.cfg file. Since MT is not installed in a cgi-bin directory, you should protect your mt.cfg file from being viewed in a browser by adding the following to the .htaccess file in your /mt directory:

>Options All -Indexes
<Files mt.cfg>
 <Limit GET>
   deny from all
 </Limit>
</Files>

Hope this helps...

Link to comment
Share on other sites

It appears that Dreamweaver uses a configuration file that specifies what file extensions are uploaded to the server in ASCII mode:

You can define whether the types of files that you transfer are transferred as ASCII (text) or binary, by customizing the FTPExtensionMap.txt file in the Dreamweaver/Configuration folder

I guess you'd need to edit the FTPExtensionMap.txt file and add 'cfg' (or possibly '.cfg') to the file, and specify 'ASCII' as the transfer mode to have DreamWeaver upload the mt.cfg file properly.

Link to comment
Share on other sites

Ok all changes have been made and I edited the dreamweaver file to upload in ASCII.

 

Still getting:Got an error: Bad ObjectDriver config: Connection error: Access denied for user: 'beak@localhost' (Using password: YES)

 

This is my CFG file:

 

 

CGIPath [u]http://www.newsbeak.com/mt/[/u]

 

 

 

DataSource ./db

 

 

ObjectDriver DBI::mysql

Database newsbeak_com_blog

DBUser beak

DBHost localhost

 

 

[color=blue][size=1]Edit: TCH-Bruce - made link inactive[/size][/color]

Link to comment
Share on other sites

On the server, you should check your database in the Database Manager and make sure that 1) a database user 'beak' exists, and 2) the database user 'beak' has permission to access the 'newsbeak_com_blog' database. Normally, you would need to 'add' the user to the database to give the user access permissions as a separate step after you have created the database user.

 

Another possible cause of this error is that the password (the one for the database user 'beak') is not specified correctly in the mt-db-pass.cgi file.

Link to comment
Share on other sites

Ok well that didn't work either... I am currently trying my hosting companies tech support... Hopefully they will have an answer to what is supposted to go in the MT.CFG file. But if any of you still have any ideas I am willing to try :blush:.

 

Thanks so much!

Link to comment
Share on other sites

Wait! It ried something else and now I am getting this :

 

Got an error: Unsupported driver MT::ObjectDriver::DBD::mysql: Can't locate MT/ObjectDriver/DBD/mysql.pm in @INC (@INC contains: ./extlib ./lib /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at (eval 3) line 1. BEGIN failed--compilation aborted at (eval 3) line 1.

 

This is what I changed:

ObjectDriver DBI::mysql

 

to

 

ObjectDriver DBD::mysql

 

Hummmmmm.... Any ideas?

Link to comment
Share on other sites

Try installing MT Medic - takes three seconds, and it doesn't rely on your Movable Type infomation to give you access.

 

You can reset, create and edit authors and passwords along with a million other things in case something goes wrong.

 

Even if it doesn't help you with this problem (although it should), I think you should have it anyway. :)

Link to comment
Share on other sites

Ok this is what I get when I rad the mt-load.cgi

 

Loading initial data into system...

Loading database schema...

An error occurred while loading data:

 

Table 'mt_author' already exists at mt-load.cgi line 195.

 

 

* I am sorry if I sound silly. I wasn't the original person who installed this. I am taking over aother persons job. Thats why there is alot of confusion and she no longer works here. *

Link to comment
Share on other sites

That error message indicates that mt-load.cgi has already been run once. Is this a new installation of MT, or are you trying to get into an existing one?

 

If this is a new install of MT, and logging in with Melody/Nelson does not work, you'd need to delete (drop) all of the tables in the newsbeak_com database, re-run mt-load.cgi, then log in with Melody/Nelson.

 

If this is an exisiting installation (there's weblog data already entered that you want to keep), then you'd need to install the MTMedic tool that Marie linked to, and use to reset the password in the database.

Link to comment
Share on other sites

Ok while using Mt-medic.cgi this is the errors I recieve An error occurred:

 

No ObjectDriver defined at lib/MT/Object.pm line 105.

 

 

When using mt-load.cgi this is the error I receive:

Bad ObjectDriver config: Connection error: Access denied for user: 'beak@localhost' (Using password: YES)

 

When running mt-check.cgi this is what I get:

You're ready to go! Your server has all of the required modules installed; you do not need to perform any additional module installations. Continue with the installation instructions.

 

 

And I can long in if I remove this out of MT.cfg

ObjectDriver DBI::mysql

Database newsbeak_com

DBUser beak

DBHost localhost

 

But I need this in there correct or no?

I really appreciate your help!

Link to comment
Share on other sites

And I can log in if I remove this out of MT.cfg

>ObjectDriver DBI::mysql
Database newsbeak_com
DBUser beak
DBHost localhost

If you remove this from your mt.cfg file, MT will use Berkeley DB as the database driver instead of MySQL, and will try to access a different database stored as files on your server, rather than the database on the MySQL server.

 

Ok while using Mt-medic.cgi this is the errors I recieve An error occurred:

 

No ObjectDriver defined at lib/MT/Object.pm line 105.

That sounds like you're trying to run MT-Medic while you have the above database options disabled / removed from your mt.cfg file.

 

When using mt-load.cgi this is the error I receive:

Bad ObjectDriver config: Connection error: Access denied for user: 'beak@localhost' (Using password: YES)

Previously, you said this DBUser worked without errors from the MySQL server:

>DBUser newsbeak

But now you've gone back to trying to use this DBUser, which never worked:

>DBUser beak

If you want to use MySQL for your MT database, you need to leave the database options in place in your mt.cfg file. You need to configure mt.cfg to use a MySQL username (DBUser) that has access to the MySQL database on your server. *Then* you can look at whatever error messages are still occurring and figure out how to address them, but it won't involve messing around with the database settings once you get valid ones working.

Link to comment
Share on other sites

You might try checking for this somewhat obscure problem I ran into with MT/MySql.

 

If your Mysql host is "localhost" you may be running into a "default" setting problem in MySql.

 

The Mysql database contains a table named "user" - if you check that table you might find that there are two rows in that table for the username you're trying to log in as - one row will contain a column for "Host" that will be "localhost", the other row will contain a column for "Host" that will be "%".

 

If this is the case in your database then delete the row containing your username and the "%" "Host" value.

 

Frequently the cause of "access denied" errors is the wildcard "Host" entry in the database is pre-empting the "localhost" "Host" entry!

 

Also:

1) Apologies - I neglected to say WELCOME!

2) TCH-David is right - for troubleshooting the mt-check.cgi doesn't do much for ya. TCH-David is an excellent troubleshooter - I've seen him work minor and major miracles through his forum posts. Remarkable guy.

Edited by jwbowden
Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...