My Sql db cannot be found, please help

Discussion in 'General' started by tomcattyy, Mar 13, 2010.

  1. tomcattyy

    Joined:
    Mar 2, 2010
    Messages:
    11
    Likes Received:
    0
    Hello there,
    I want to show the CDR report from a windows web server, so the first thing is find the DB and tables been used. I login as root and opened the mysql and got results as follows:

    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    +--------------------+

    That's the only one shown makes me wonder where did the asteriskcdrdb went? The report tab is functioning correctly from the elastix.

    Appreciate your help.

    Mark
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    It's a funny old world but if:

    strings /var/lib/mysql/asteriskcdrdb/cdr.MYD

    is "not null", then it's defiantly there, have you in any way messed with the accounts or permissions of them?
     
  3. tomcattyy

    Joined:
    Mar 2, 2010
    Messages:
    11
    Likes Received:
    0
    Hello Dicko,

    Yes, /var/lib/mysql/asteriskcdrdb/cdr.MYD is there no problem.

    My root password is not the same as eLa.. default one, will that keep me from seeing the db when login as root@192.168.1.200 ?
    Other than this, I did not change permission on anyfolder.
    or which user should I use to login to view these db?

    Thanks for helping .
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    By default the root account in Elastix is constrained to localhost (127.0.0.1) with a password of eLaStIx.2oo7, (that's pretty secure don't you agree? ) if you change that or try to expand it's privileges you do so at your peril.

    I suggest that you never mess with the root account, it's just plain dangerous and should ALWAYS be limited to localhost. Just add another user with the minimal access to the data structures it needs, and with access from the minimal IP address space that it will use (That's if you're using TCP and not socket access, but that's another discussion).

    (just a note one of my firewall today counts 28 attempts at TCP/3306 (all from China I might note) and all denied (I hope) caveat implimentor!! )
     
  5. tomcattyy

    Joined:
    Mar 2, 2010
    Messages:
    11
    Likes Received:
    0
    Bear with me Diko, my question is when I installed Elastix, I have created a root user with a selected password, this password should have no effect with the mysql root? please correct me if I am wrong.
    I did not try to change the default password :)

    When I log in as root and type in mysql -uroot -p and enter the default eLaStIx.2007 password
    it says
    Access denied for user 'root@localhost' (using password:Yes)

    But if I type mysql -uroot@192.168.1.200 and I will get to see the
    mysql> prompt.

    It seems a permission issue, What can I try to access?

    Thanks

    Mark
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    tomcattyy:

    There is by default a root user with the password that you selected on install, this is just the standard linux account, and has nothing to do with mysql, that has it's own ACL methodology.

    From the "box" itself you can by default access the root account with the right credentials.

    If you access it from any other host (192.168.1.200) it just won't allow that unless you expand the privileges, as I said if you did that it's probably a "bad thing"

    if

    mysql -uroot -peLaStIx.2oo7 -h127.0.0.1 -e "show databases"


    from the host itself (console or ssh), doesn't include what you want, it WILL from a standard Elastix install, you broke it. :) :)

    p.s.


    mysql -uroot@www.yahoo.com

    will give you a mysql command prompt with exactly the same privileges that root@www.yahoo.com has and that you, the administrator, gave them.

    as will

    mysql -uknucledragger@wewillgetyou.gov.cn

    again, protect your tcp/3306 on the firewall.

    Finally and in my quest to get the whole world to RTFM so they don't waste their time needlessly stumbling in the dark, (and not without coincidence) http://dev.mysql.com/doc is a good source of how it all works. ;)

    I hope that helped,

    regards

    dicko
     
  7. tomcattyy

    Joined:
    Mar 2, 2010
    Messages:
    11
    Likes Received:
    0
    Thanks, Dico, my bad, the password is 2oo7 not 2007, I did not notice it till now.
    I will not extented the access to other server as you recommanded.

    :lol:
     
  8. zlatan24

    Joined:
    Nov 9, 2010
    Messages:
    1
    Likes Received:
    0
    For working out given situation you may use repair sql database. It can work with mdf files up to 16TB. The utility uses modern and clear methods of restoring sql data. The tool starts under all major Windows OS.
     

Share This Page