Results 1 to 7 of 7

Thread: MYSQL database Problem

  1. #1
    Just burned his ISO
    Join Date
    Mar 2010
    Posts
    18

    Default MYSQL database Problem

    Hi Guys

    I am trying to set up a mysql database in Backtrack 4 and im having some problems..

    First i could not get the service to start at all..


    so i had to type

    Code:
    mysqld_safe
    and this seemed to start the service
    and i could log in by typing..

    Code:
    mysql -u root -p
    then entering the password "toor"

    but...

    How would i create a database with a password on.

    can some one help..

    Thanks..

  2. #2
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: MYSQL database Problem

    You should try
    Code:
    root@dorkbox:~# /etc/init.d/mysql start
    To start the service. Then to apply a password.
    Code:
    root@dorkbox:~# mysqladmin -u root password passwordhere
    Log in by entering:
    Code:
    root@dorkbox:~#  mysql -u root -p
    Of course entering the password you applied earlier.


    See also:
    mysql database - mysql beginners tutorial introduction - mysql server - mysql client
    To start learning.

  3. #3
    Just burned his ISO
    Join Date
    Mar 2010
    Posts
    18

    Default Re: MYSQL database Problem

    Thanks for your quick reply and the great info

    ill try this out and let you know how it goes..

    i keep getting this after i try and change the root password...

    Code:
    error: Access denied for user root@localhost (using password: NO)
    Last edited by CeEe4; 05-14-2010 at 10:10 PM.

  4. #4
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: MYSQL database Problem

    If you want to change the MySQL password try :
    Code:
    mysqladmin -u root -p'oldpassword' password newpass

  5. #5
    Junior Member roybatty's Avatar
    Join Date
    Jan 2010
    Location
    Tannhauser Gate
    Posts
    55

    Default Re: MYSQL database Problem

    Problem is your password wasn't accepted by mysql, so now there's no root password set. Try access as root without password to verify.

    Then follow this in order to set it up.
    Replace YOURNEWPASSWORD with yours, leave the rest unchanged, quotes included.
    I've seen things you people wouldn't believe.

  6. #6
    Just burned his ISO Jaylong's Avatar
    Join Date
    Dec 2010
    Location
    China
    Posts
    15

    Default 回复: Re: MYSQL database Problem

    Quote Originally Posted by Archangel-Amael View Post
    You should try
    Code:
    root@dorkbox:~# /etc/init.d/mysql start
    To start the service. Then to apply a password.
    Code:
    root@dorkbox:~# mysqladmin -u root password passwordhere
    Log in by entering:
    Code:
    root@dorkbox:~#  mysql -u root -p
    Of course entering the password you applied earlier.


    See also:
    mysql database - mysql beginners tutorial introduction - mysql server - mysql client
    To start learning.
    i did it as yours,it is my first time login mysql,i didnot set any password for root,when i
    Code:
    root@bt:~#  mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    so i try
    Code:
     root@bt:~#  mysql -u root@localhost
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 31
    Server version: 5.0.67-0ubuntu6 (Ubuntu)
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    but i try setpasswd for root
    Code:
    update user set password=password('mypasswd') where user='root';
    ERROR 1046 (3D000): No database selected
    and
    Code:
     show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    +--------------------+
    1 row in set (0.00 sec)
    and when i cannot create db
    Code:
    create database radius;
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'radius'
    i have no idea about this ,how to deal with it
    斯须九重真龙出,一洗万古凡马空

  7. #7
    Just burned his ISO
    Join Date
    Jan 2010
    Location
    PA
    Posts
    9

    Default Re: MYSQL database Problem

    Hello Jaylong hope this may help you also it seems you dont have a password in place as per your post (you should be able to login with password toor

    Code:
    root@bt:~#  mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    I think whether you have a password or not you have to pass the argument -p (mysql -u root -p
    Code:
    root@bt:~#  mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    Code:
     root@bt:~#  mysql -u root@localhost
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 31
    Server version: 5.0.67-0ubuntu6 (Ubuntu)
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    I noticed when you loged with the command above you got the command line good now try
    Code:
    mysql> help set password
    Then try this sir.

    Code:
    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('urnewpass');
    Done

Similar Threads

  1. Book like "The Database Hacker's Handbook: Defending Database Servers"
    By -=Renegade=- in forum OLD General IT Discussion
    Replies: 3
    Last Post: 01-01-2010, 04:18 AM
  2. Problem with Aicrack after Database Airolib
    By manulu in forum OLD BackTrack 4 (pre) Final
    Replies: 0
    Last Post: 10-15-2009, 03:46 PM
  3. MYSQL T_T Big problem with ussers
    By Debci in forum OLD Newbie Area
    Replies: 2
    Last Post: 09-08-2009, 10:21 PM
  4. Mysql problem
    By bluster in forum OLD Newbie Area
    Replies: 6
    Last Post: 09-19-2008, 08:19 AM
  5. Sun buy MySQL
    By Re@lity in forum OLD General IT Discussion
    Replies: 4
    Last Post: 01-18-2008, 04:26 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
  •