Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP MyAdmin: No Privelages

Options
  • 18-02-2015 7:56pm
    #1
    Registered Users Posts: 2,592 ✭✭✭


    Hi guys, working on a small project for college and have run into some trouble when setting up a local host server (running Mac OS X 10.9.5). I have setup my MySQL and phpMyAdmin but i have "No Privileges" to create a database. I've also tried to create a database through terminal commands with mysql but get this error:
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'testbase'

    I have set up username as 'root' and password as 'password'. I'm at a complete loss here and tried everything i could find online. Any ideas??

    I followed this tutorial to set it up


Comments

  • Registered Users Posts: 6,252 ✭✭✭Buford T Justice


    How are you connecting via the command line? Looks like you've not specified a username. You should be connecting using
    mysql -u root 'password'
    

    in order to specify the username to have admin privileges.


  • Registered Users Posts: 2,592 ✭✭✭irish_stevo815


    How are you connecting via the command line? Looks like you've not specified a username. You should be connecting using
    mysql -u root 'password'
    

    in order to specify the username to have admin privileges.

    That just returns an error:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


  • Technology & Internet Moderators Posts: 28,799 Mod ✭✭✭✭oscarBravo


    Use
    mysql -u root -p<password>
    
    (without a space between -p and the password) or just
    mysql -u root -p
    
    to be prompted for a password.


  • Registered Users Posts: 2,592 ✭✭✭irish_stevo815


    Ok so i uninstalled MySQL and tried starting over. Using this tutorial http://www.maketecheasier.com/setup-web-server-in-mountain-lion/, it was all going ok until I got to setting up thre MySQL root password:
    /usr/local/mysql/bin/mysqladmin -u root password 'password'

    Returned the same errors:
    connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'


  • Technology & Internet Moderators Posts: 28,799 Mod ✭✭✭✭oscarBravo


    I'm not sure what's going on - have a look here and see if it helps.


  • Advertisement
  • Registered Users Posts: 1,299 ✭✭✭moc moc a moc


    /usr/local/mysql/bin/mysqladmin -u root password 'password'

    This command will only work as-is if you don't already have a root password set up. Use the command oscarBravo gave you:

    mysql -u root -p


Advertisement