Results 1 to 3 of 3

Thread: Stuck at create user account for MySQL

  1. #1
    Join Date
    Mar 2009
    North Borneo

    Stuck at create user account for MySQL

    I have fresh installed Mysql with php5, and i was following the instruction at page The problem is, i couldn't get the exact output as the page shown, such as

    nano /etc/mysql/my.cnf

    mysql -u root

    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

    It just kept saying access denied for user 'root'@'localhost'

    and i saw the info at other page, it says need to add a line at somewhereelse, but, they didn't mention which file and under which directory to edit. So i have been stuck for few days and still can not figure out how to create an user for mysql and to add a new database.

    Anyone can please point out the problem? Thanks!


  2. #2
    Join Date
    Aug 2008

    Re: Stuck at create user account for MySQL

    mysql -u [your username, assuming it's an admin user] -p

    it will then ask for your password and just use the one for the user you are logged in as. If you are an admin then that will get you to mysql prompt.

  3. #3
    Join Date
    Dec 2006

    Re: Stuck at create user account for MySQL

    To login as root on mysql:
    mysql -u root -p
    Use the password you entered while installing mysql-server. If you forgot it:
    sudo dpkg-reconfigure mysql-server-5.0
    It sounds like that guide is outdated. I think mysql used to have no root password by default, as that guide sounds like it assumes. That is not the case for current versions of ubuntu. You could skip that step of the guide.
    Last edited by cdenley; April 1st, 2009 at 08:49 PM.


Posting Permissions

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