The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unusual problem with MySql

Discussion in 'General Discussion' started by Guigows, Jul 24, 2006.

  1. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Dear Sirs,

    I'm having some unusual problem with mysql in my server....:(

    I can create the database, user, set permissions, etc with no problem via Cpanel, I can see the entire database via PhpMyadmin, but in an php file I'm having some problems...

    Scripts that was running with no problems in another server, has problem in this one, as you can see at:

    http://www.host-it.com.br/whmm/whmcs/order.php?step=2&pid=3

    Some times there is no error, but nothing happen as you can see at
    http://www.nuish.net/news.php?newsid=1 (here, you should see one article but you can see nothing)

    I think it depend which mysql function or command is running...


    I’m running MySQL - 5.0.21-standard In fedora core 3.
    Anybody know what should be happening?

    Thank you!;)
     
    #1 Guigows, Jul 24, 2006
    Last edited: Jul 24, 2006
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Looks like your password is not setup correctly in the database. you may want to delete the database user and flush the privelages and recreate it again.
     
  3. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I did, but the problem remains... :(
     
  4. Anishts

    Anishts Active Member

    Joined:
    Oct 6, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Try this

    Hi,

    This is your error out put

    " Access denied for user 'hostit'@'localhost' (using password: NO) ". It says that password is not used. Please double check your user name and password for the particular database in the php config file. Try username and pass from command line to login.
     
  5. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1

    Username and password are ok... I'd created database, users again, and the problem remains....
     
  6. WebmastTroy

    WebmastTroy Well-Known Member

    Joined:
    Apr 28, 2002
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    The "(using password: NO)" part tells you that your PHP script isn't sending a password to be checked. I'd check your variables to make sure it's being passed to MySQL during the connection.

    Also, unless MySQL's error syntax has changed recently, 'hostit'@'localhost' should be 'hostit@localhost' in the error. Probably nothing though.

    If you have shell access, try:

    mysql -u usernamehere -p

    It will prompt for a password. That will tell you if those are correct.
     
  7. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1

    log ok!! I really don't know what is happenig...:rolleyes:
     
  8. Anishts

    Anishts Active Member

    Joined:
    Oct 6, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Have you tried what WebmastTroy said :)

    from shell

    # mysql -u hostit -p

    and give us the result...


    :cool:
     
  9. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I could be mistaken, but MySQL v5 doesn't support all Php scripts. Did you have MySQL v5 on the previous server? If yes and the script worked there just fine, then check the log files for any errors. If you can't solve this problem yourself or if nothing here helps, hire a sys admin.
     
  10. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1

    hello!

    the user accout is "hostit" the mysql user is "hostit_whm"
    follow results of both:
    ----------------------------------------------------------------------
    root@host [~]# mysql -u hostit -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 10170 to server version: 5.0.21-standard

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>
    -----------------------------------------------------------------------
    root@host [~]# mysql -u hostit_whm -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 10172 to server version: 5.0.21-standard

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>
    -------------------------------------------------------------------------
     
  11. Anishts

    Anishts Active Member

    Joined:
    Oct 6, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi

    This clearly shows that there is no problem with username and password.It seems that the issue is with php script. Can you check the username and password given in config.php or some thing like that in the directory/or in subdirectories that defines database connection. and if you fond please verify the username and password again in the config file.

    :cool:
     
  12. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Everything with config.php are ok, username, passwd... this script works ok in another server...
    This server doesn’t run any script with mysql as you can see another script in this server
    http://www.nuish.net/news.php?newsid=1 you should see an article but you see nothing.

    Thanx
     
  13. Anishts

    Anishts Active Member

    Joined:
    Oct 6, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi

    Seems like you need to get in touch with an system admin...

    :D
     
  14. Guigows

    Guigows Active Member

    Joined:
    Nov 16, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    My sys admin is sick... do you know someone?
     
  15. VirtuaLira

    VirtuaLira Well-Known Member

    Joined:
    Feb 1, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chile
    Maybe is the oldpassword thing.

    You must open the mysql console and run:

    SET PASSWORD FOR `user`@`localhost` oldpassword=('passhere');

    *** YOU MUST CREATE THE USER FIRST***
     
Loading...

Share This Page