Results 1 to 11 of 11
  1. #1

    WHM account transfer: MySQL error

    Hello,

    I'm trying to move all accounts from one server to another. However I'm getting the next errors when it tries to transfer the accounts:

    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
    Grabbing mysql dbs............
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 724.
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 502.
    Done
    Grabbing mysql privs...DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Done
    Copying mailman lists....Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 724.
    Done
    I checked /var/lib/mysql for mysql.sock but can't find it. What should I do?

    Thanks

  2. #2
    Join Date
    May 2002
    Location
    Moscow
    Posts
    1,602
    this mean that your mysql server just not work (even if you see his process in top). you should check error log filr for your mysql server (usually it is located in /var/lib/mysql anbd called as your-hostname.err
    TK Rustelekom LLC Dedicated server since 2002, RIPE NCC member, LIR

  3. #3
    Make sure you tranfers between 2 server with same Mysql version . If not Upgrade Mysql before tranfers . Check some module install between 2 servers are same . Note : Tranfers manual if your's account bigger 500MB .

  4. #4
    make sure MySQL is running on the server. Run:

    /var/lib/mysql/bin/mysqld_safe &

    what does that show?

  5. #5
    Quote Originally Posted by FirmbIT
    make sure MySQL is running on the server. Run:

    /var/lib/mysql/bin/mysqld_safe &

    what does that show?
    This is what I did/get:

    root@server [/tmp]# /var/lib/mysql/bin/mysqld_safe &
    [1] 14017
    -bash: /var/lib/mysql/bin/mysqld_safe: No such file or directory
    root@server [/tmp]# locate mysqld_safe
    /usr/share/man/man1/mysqld_safe.1.gz
    /usr/bin/mysqld_safe
    [1]+ Exit 127 /var/lib/mysql/bin/mysqld_safe
    root@server [/tmp]# /usr/bin/mysqld_safe &
    [1] 18624
    root@server [/tmp]# A mysqld process already exists

    [1]+ Exit 1 /usr/bin/mysqld_safe
    root@server [/tmp]
    When I view that logfile I get this:

    Number of processes running now: 1
    mysqld process hanging, pid 32642 - killed
    050929 22:36:25 mysqld restarted
    050929 22:36:25 Warning: Asked for 196608 thread stack, but got 126976
    050929 22:36:25 InnoDB: Started
    /usr/sbin/mysqld: ready for connections.
    Version: '4.0.25-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 Official MySQL RPM
    051226 17:15:56 mysqld started
    051226 17:16:03 Warning: Asked for 196608 thread stack, but got 126976
    051226 17:16:24 InnoDB: Started
    /usr/sbin/mysqld: ready for connections.
    Version: '4.0.25-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 Official MySQL RPM
    A mysqld process already exists at Mon Dec 26 17:16:47 GMT 2005
    Seems nothing wrong in there I guess?

    I'll try to upgrade the MySQL servers now.

  6. #6
    I checked phpMyAdmin on both servers and they both say:

    MySQL 4.0.25-standard running on localhost as root@localhost

  7. #7
    Why you don't download folder /var/lib/mysql/folderxxx and move to new server

  8. #8
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    24
    Quote Originally Posted by HoangJav@
    Why you don't download folder /var/lib/mysql/folderxxx and move to new server
    Yes, if both the servers are running the same MySQL version then you can simply rsync the database folder from the old server to the new one.
    When you say "I wrote a program that crashed Windows", people just stare at you blankly and say "Hey, I got those with the system, *for free*".

  9. #9
    Quote Originally Posted by WebScHoLaR
    Yes, if both the servers are running the same MySQL version then you can simply rsync the database folder from the old server to the new one.

    But I already have accounts on the server to which I want to move the accounts to. Won't that overwrite anything?

    Edit: also, can't I just symlink the mysql.sock file to /var/lib/mysql/mysql.sock? The file exists but not in that directory...

  10. #10
    it does'nt problem . a folder in /var/lib/mysql/ is a database you had been create . You can move some databases to new server don't overwrite if have an exits . If you have any folder is same name between 2 server you can't conpy by WHT too . That's why Cpanel create database with name account_name .

  11. #11
    Ok thanks. Will this also solve this issue:

    Copying mailman lists....Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 724.
    Done
    I guess that gets copied over too or do I have to do anything special for that?

Posting Permissions

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