Results 1 to 3 of 3

Thread: Stuck at create user account for MySQL

  1. #1
    Join Date
    Mar 2009
    Location
    North Borneo
    Beans
    86

    Stuck at create user account for MySQL

    I have fresh installed Mysql with php5, and i was following the instruction at page https://help.ubuntu.com/community/ApacheMySQLPHP. 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!

    Regards,
    Grey08

  2. #2
    Join Date
    Aug 2008
    Location
    Dallas
    Beans
    57

    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
    Location
    Chicago
    Beans
    3,839

    Re: Stuck at create user account for MySQL

    To login as root on mysql:
    Code:
    mysql -u root -p
    Use the password you entered while installing mysql-server. If you forgot it:
    Code:
    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.

Bookmarks

Posting Permissions

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