Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

PHP MyAdmin: No Privelages

  • 18-02-2015 07:56PM
    #1
    Registered Users, Registered Users 2 Posts: 2,609 ✭✭✭


    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, Registered Users 2 Posts: 6,271 ✭✭✭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, Registered Users 2 Posts: 2,609 ✭✭✭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,859 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, Registered Users 2 Posts: 2,609 ✭✭✭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,859 Mod ✭✭✭✭oscarBravo


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


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,298 ✭✭✭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