Jump to content

killdurst

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by killdurst

  1. Hi I've managed to run the two different versions of MySQL on the same server!

    To fix the problem above, I just included the basedir and datadir variables when I started MySQL:

    XX.) To run mysql4: #./mysqld -uroot -P3306 --socket=/tmp/mysql4.sock --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --log=/usr/local/mysql/data/mysqld.log --pid-file=/usr/local/mysql/data/mysql.pid

    XX.) To run mysql5: #./mysqld -uroot -P3307 --socket=/tmp/mysql5.sock --basedir=/usr/local/mysql5 --datadir=/usr/local/mysql5/data/ --log=/usr/local/mysql5/data/mysqld.log --pid-file=/usr/local/mysql5/data/mysql5.pid

    Thanks a lot guys!
  2. Hi, thanks for replying!

    Ok, I finally managed to get the two different versions of MySQL to run on the same server. But when I log on to MySQL 5 and looked at the databases and tables, it's showing the databases and tables from MySQL 4! Below are the 7 steps I took:

    01.) Reboot the system.
    02.) Ensure that my.cnf in "/usr/local/mysql4/data" contains the following (not in order):
    [code]
    [client]
    #password      = your_password
    port            = 3306
    socket          = /tmp/mysql4.sock
    [mysqld]
    port            = 3306
    socket          = /tmp/mysql4.sock
    innodb_data_home_dir = /usr/local/mysql4/data/
    innodb_log_group_home_dir = /usr/local/mysql4/data/
    innodb_log_arch_dir = /usr/local/mysql4/data/
    [/code]
    03.) Ensure that the my.cnf in "/usr/local/mysql5" contains the following lines (not in order):
    [code]
    [client]
    #password      = your_password
    port            = 3307
    socket          = /tmp/mysql5.sock
    [mysqld]
    port            = 3307
    socket          = /tmp/mysql5.sock
    innodb_data_home_dir = /usr/local/mysql5/data/
    innodb_log_group_home_dir = /usr/local/mysql5/data/
    innodb_log_arch_dir = /usr/local/mysql5/data/
    [/code]
    04.) Configured MySQL 4 by going to "/usr/local/mysql4" and typing:
    [code]
    ./configure --with-tcp-port=3306 --with-unix-socket-path=/tmp/mysql4.sock --prefix=/usr/local/mysql4
    [/code]
    05.) Configured MySQL 5 by going to "/usr/local/mysql5" and typing:
    [code]
    ./configure --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql5.sock --prefix=/usr/local/mysql5
    [/code]
    06.) Started MySQL 4 by going to "/usr/local/mysql4/bin" and typing:
    [code]
    ./mysqld -uroot -P3306 --socket=/tmp/mysql4.sock
    [/code]
    07.) Started MySQL 5 by going to "/usr/local/mysql5/bin" and typing:
    [code]
    ./mysqld -uroot -P3307 --socket=/tmp/mysql7.sock
    [/code]

    In my.cnf for MySQL 5, I've ensured that the data folders are all pointing to the ones in MySQL 5 but when I logged on to MySQL 5 by typing:
    [code]./mysql -uroot -pkooprime -P3307 --socket=/tmp/mysql5.sock[/code]
    the databases and tables I see are all the ones that belong in "/usr/local/mysql4/data" instead of "/usr/local/mysql5/data". Did I forget to edit some files? How do I troubleshoot this? Appreciate all your help. Thanks!
  3. Hi, I'm looking in /tmp.

    Since i'm trying to run 2 different versions of mysql (4 and 5). Should the my.cnf file be in /etc or in both "/usr/local/mysql-standard-4.0.18-pc-linux-i686/data" and "/usr/local/mysql-standard-5.0.18-linux-i686/data"?

    Currently, in my linux computer, there is no my.cnf in /etc, just in the data folders of the two mysql versions. In mysql4's version of my.cnf, the port is 3306 and the socket is pointing to /tmp/mysql4.sock. In mysql5's version of my.cnf, the port is 3307 and the socket is pointing to /tmp/mysql5.sock.

    When I go to "/usr/local/mysql-standard-4.0.18-pc-linux-i686/bin" and typed "./mysql -uroot", I get this error message: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql4.sock' (111)

    I went to /tmp and there wasn't any mysql4.sock this time, but there was a mysql5.sock. So I copied that mysql5.sock and renamed it mysql4.sock.

    I went back to "/usr/local/mysql-standard-4.0.18-pc-linux-i686/bin" and typed "./mysql -uroot" and still got the same error message.

    When I tried to shutdown mysql4, i typed "./mysqld shutdown" but got this error message:
    060928 12:46:27  Can't start server: Bind on TCP/IP port: Address already in use
    060928 12:46:27  Do you already have another mysqld server running on port: 3306 ?
    060928 12:46:27  Aborting

    Any help would be greatly appreciated. Thanks.
  4. Hi, can't find this info anywhere. I'm trying to run 2 mysql servers on the same machine. I managed to do it before but cannot do it again. i'm trying to install both mysql 4 and 5 on a linux machine. got most of the info from http://dev.mysql.com/doc/refman/5.0/en/multiple-unix-servers.html.

    I tried to run mysql 4 but couldnt:

    [root@avocet bin]# pwd
    /usr/local/mysql-standard-4.0.18-pc-linux-i686/bin
    [root@avocet bin]# ./mysql -uroot
    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql4.sock' (111)

    When I looked in "tmp", there is a "mysql4.sock".
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.