Web Hosting Talk







View Full Version : mysql connection problem


diyoha
09-23-2001, 11:14 AM
Hello,

Can someone who has successfully created a MySQL database for a virtual hosting account show me how to connect! I can always connect as root ... but when I try to connect as the user its get a permission error. I went to the database and gave the user of that virtual accout all premisions in the USER table in the MYSQL database. But that did not help. Here is the error I get:

mysql> use bcwdb;
ERROR 1044: Access denied for user: '@localhost' to database 'bcwdb'

I know it is something simple ... but I cannot figure it out! :(

thanks

David

Chicken
09-23-2001, 12:08 PM
Well, this could be due to how the db was det up. I don't pretend I know much about this stuff, -just use that handy dandy set up script by Jens and have had no problems once I try to connect, so maybe dumb it down like I did and see if that works? Yes, I know this borders on sad... :blush:

eva2000
09-23-2001, 12:20 PM
Originally posted by diyoha
Hello,

Can someone who has successfully created a MySQL database for a virtual hosting account show me how to connect! I can always connect as root ... but when I try to connect as the user its get a permission error. I went to the database and gave the user of that virtual accout all premisions in the USER table in the MYSQL database. But that did not help. Here is the error I get:

mysql> use bcwdb;
ERROR 1044: Access denied for user: '@localhost' to database 'bcwdb'

I know it is something simple ... but I cannot figure it out! :(

thanks

David if you're providing mysql for paying customers it would be advisable if you familiarize yourself with the mysql.com docs they're very useful ;)

http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html#Tutorial

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Privilege_system

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#User_Account_Management

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Disaster_Prevention

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Database_Administration

diyoha
09-23-2001, 01:14 PM
Originally posted by Chicken
Well, this could be due to how the db was det up. I don't pretend I know much about this stuff, -just use that handy dandy set up script by Jens and have had no problems once I try to connect, so maybe dumb it down like I did and see if that works? Yes, I know this borders on sad... :blush:
I use the autosetup script ... and that does not seem to work :(

I read my the chapter on previleges in my handy MySQL reference book ... and everything seems to be setup right ... I now I must be missing something simple.

kunal
09-23-2001, 03:51 PM
well, how are you connecting to it via shell??

are you trying the following command?

mysql -u username -p ??

Kunal

diyoha
09-23-2001, 04:24 PM
I tried two ways.

by the shell. This is what I get:

[lindab lindab]$ mysql -u lindab -p
Enter password:
ERROR 1045: Access denied for user: 'lindab@localhost' (Using password: YES)

and via my VBB install script .. which gives the same type error

I looked in the Mysql database and I think I have each required record
ie
user table
| localhost | lindab | ....

host table
| localhost | bcwdb | Y | Y | Y | Y ...

db table
| localhost | bcwdb | lindab | Y ...

and the above does not seem to work .... I am loosing my mind

David

jks
09-23-2001, 04:38 PM
Originally posted by diyoha
user table
| localhost | lindab | ....


Did you remember to encrypt the password in that table?

Did you try the setup script I wrote? (www.raqsupport.net)
It usually does the trick.

diyoha
09-23-2001, 05:44 PM
Originally posted by jks


Did you remember to encrypt the password in that table?


Yes I did. I redid the password just to see. But it still does not work. Here is the error I get from the VBB web setup:
--
Attempting to attach to database...


Warning: MySQL Connection Failed: Access denied for user: 'lindab@localhost' (Using password: YES) in /home/sites/site9/web/forum/admin/db_mysql.php
on line 40

Warning: Supplied argument is not a valid MySQL-Link resource in /home/sites/site9/web/forum/admin/db_mysql.php on line 47

The database has failed to connect because you do not have permission to connect to the server. Please go back to the last step and ensure that you have entered all your
login details correctly.
-
I have check everything over and over again ... but cannot figure out what is going on ... anyone have any ideas?

aarrggggggg :bawling:

David