Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2012
    Posts
    3

    Smile Unanswered: Error 1044 problem

    Hello all, I'm new.

    I'm generally new to MySql in general and wonder if any of you could help me with a little problem?

    I have a standard MySql script, the script is as follows (See code below). It does everything it's supposed to - creates the database if it doesn't exist, drops the tables if they exists and creates them again. Everything goes swimmingly until the grant statement. I have run this in xampp on my local machine and it works perfectly, even putting the data into the table it supposed to. But when I import it using PhpMyAdmin onto my server at the hosts end I run into trouble.

    When I 'import' my sql script (see below) I keep getting a 1044 error. It tells
    me ---

    #1044 - Access denied for user 'disco209'@'localhost' to database 'disco209_mlm'

    It's obviously the privileges, However, I do not know what to do
    here to solve this. Can you please tell me what I need to put into my grant
    statement OR what settings to alter on my 'MyPhpAdmin' to allow it to work?

    My host is running PhpMyAdmin 3.4.9 if it helps. Also I have not created any users or passwords in mysql

    Once again thanks for any advice here.
    Regards
    JasonPC

    ----------------- START MY SQL SCRIPT ---------------------

    CREATE DATABASE IF NOT EXISTS disco209_mlm;

    use disco209_mlm;

    drop table if exists lists;
    create table lists
    (
    listid int auto_increment not null primary key,
    listname char(20) not null,
    blurb varchar(255)
    );

    drop table if exists subscribers;
    create table subscribers
    (
    email char(100) not null primary key,
    realname char(100) not null,
    mimetype char(1) not null,
    password char(16) not null,
    admin tinyint not null
    );

    # stores a relationship between a subscriber and a list

    drop table if exists sub_lists;
    create table sub_lists
    (
    email char(100) not null,
    listid int not null
    );

    drop table if exists mail;
    create table mail
    (
    mailid int auto_increment not null primary key,
    email char(100) not null,
    subject char(100) not null,
    listid int not null,
    status char(10) not null,
    sent datetime,
    modified timestamp
    );

    # stores the images that go with a particular mail

    drop table if exists images;
    create table images
    (
    mailid int not null,
    path char(100) not null,
    mimetype char(100) not null
    );

    grant select, insert, update, delete
    on disco209_mlm.* to disco209@localhost identified by 'password';

    insert into subscribers values ('admin@localhost', 'Administrative User', 'H',
    password('admin'), 1);

    ----------------- END MY SQL SCRIPT ---------------------

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    dumb question does user disco209.... exist?

    and or does the user account you are using for this session have appropriaet permissions to change the system data
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Feb 2012
    Posts
    3
    Good question. My host designates my account as disco209 therefore all my databases start with disco209_ , I think that's 'root'.

    I have even set up a user called disco209_user1 with a password of password100, manually set the privileges to 'all privileges' and changed the code as follows

    grant select, insert, update, delete
    on disco209_mlm.* to disco209_user1@localhost identified by 'password100';

    insert into subscribers values ('admin@localhost', 'Administrative User', 'H', password('admin'), 1);

    I still get the 1044 error.

    I'm completely stumped
    Jason

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If this is a server on a remote machine owned and / or administered by another organisation then Im, retty certain this error will turn out to be caused because your user id doesn't have permission to change privileges.

    I'd suggest you contact your ISP and find out what they recommend. it may well be that you have the select, insert, update, delete privileges, just that you cannot assign them

    If I was an ISP I'd be very very wary permitting anyone outside company the right to assign privileges (unless they had to)
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Feb 2012
    Posts
    3
    Thanks for the advice, I've mailed them off to that effect.

    Just to let you know, I should have privileges as it's a server package that I've paid for and am supposed to be able to put my own DB's on there and manipulate them with Php. So I'll see what they say.

    Thanks for all the advice though.
    Warmest regards
    Jason

  6. #6
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    The issue here is that you do not have CREATE USER privilege which allows you to create a user for this database via the GRANT statement.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •