PDA

View Full Version : #1044 - Access denied for user 'cruisew'@'localhost' to database 'emailer'


stevan
11-09-2007, 10:16 PM
I am trying to import a database into MySql and getting the following error message

#1044 - Access denied for user 'cruisew'@'localhost' to database 'emailer'

Here is what I am importing

CREATE DATABASE `emailer`;
USE emailer;

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON emailer.* TO prjuser@localhost IDENTIFIED BY 'pr0ject';
--
-- Table structure for table `schedules`
--

CREATE TABLE `schedules` (
`id` bigint(12) NOT NULL auto_increment,
`cust_name` varchar(50) NOT NULL default '',
`cust_email` varchar(50) NOT NULL default '',
`send_date` date NOT NULL default '0000-00-00',
`template_no` varchar(25) NOT NULL default '0',
`reg_no` mediumtext NOT NULL,
`sent` char(1) NOT NULL default 'N',
PRIMARY KEY (`id`),
UNIQUE KEY `cust_id` (`cust_name`,`cust_email`,`send_date`)
) TYPE=MyISAM;



Thxs Steve

guelphdad
11-09-2007, 10:26 PM
you are creating a new database but the only person you are giving it permission to use is prjuser but you appear to be signed into mysql as a different user. Does the user cruisew have access to all databases in mysql? if it doesn't then you won't have access to the new database to create a table in it with that user.

stevan
11-09-2007, 10:45 PM
Does the user cruisew have access to all databases in mysql?

Yes the user does

SHould i change the prjuser@localhost to cruisew@localhost

Thxs Steve