No announcement yet.

mysql error

  • Filter
  • Time
  • Show
Clear All
new posts

  • mysql error

    I have a friend helping me with trying to test a server more, he is getting this error:

    "I can't execute mysql to unpack the backup file you made. Here's what I get at the ssh prompt .

    bash-2.05$ mysql -udbadmin -ppassword -hlocalhost pca < vbulletin.sql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) bash-2.05$

    I can execute mysql as root; but I don't know the correct syntax to use as not to throw everything for a real loop."

    This is from a backup I did from the forum control panel. Any ideas? He said he did specify the correct server hostname (localhost).


    PC help forums

  • #2
    Try it without the '-hlocalhost'.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography

    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    • #3
      Thanks, he said this:

      " Won't work because it will by default try to connect to the wrong hostname (localhost.localdomain); whereby using -hlocalhost, it's supposed to point it to localhost which is what it is.

      Here's what I get when I try it w/o -hlocalhost

      bash-2.05$ mysql -udbadmin -ppassword pca < vbulletin.sql ERROR 1130: Host 'localhost.localdomain' is not allowed to connect to this MySQL server"
      PC help forums


      • #4
        Where is the socket located? It might be in /tmp/.


        • #5
          As root, the mysql directory including the socket can be found in /var/lib/ but the domain's mysql directory is supposed to be located in: /home/virtual/site6/fst/var/lib/
          PC help forums


          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.