SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Updating to mysql 5.1

    Hi

    trying to update to mysql 5.1 on mac os x 10.4.3 without much success. I've reinstalled mysql 5.1 and now in terminal when I try to start it with:

    sudo ./bin/mysqld_safe & /usr/local/mysql/bin/mysql test

    I get this error message 2002, server not running (http://dev.mysql.com/doc/refman/5.1/...-server.html):


    [1] 1342
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    127:/usr/local/mysql garrett$ 070913 11:56:08 mysqld_safe Logging to '/usr/local/mysql/data/127.0.0.1.err'.
    ./bin/mysqld_safe: line 366: [: -eq: unary operator expected
    070913 11:56:08 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
    070913 11:56:11 mysqld_safe mysqld from pid file /usr/local/mysql/data/127.0.0.1.pid ended

    so I have checked the error report as it says to do here (http://dev.mysql.com/doc/refman/5.1/...-server.html):

    070913 11:58:17 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
    /usr/local/mysql/bin/mysqld: Unknown error 1146
    070913 11:58:17 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    070913 11:58:17 InnoDB: Started; log sequence number 0 46409
    070913 11:58:17 [ERROR] Aborting

    070913 11:58:17 InnoDB: Starting shutdown...
    070913 11:58:19 InnoDB: Shutdown completed; log sequence number 0 46409
    070913 11:58:19 [Note]
    070913 11:58:19 mysqld_safe mysqld from pid file /usr/local/mysql/data/127.0.0.1.pid ended

    what is the mysql_upgrade? where is it and how do I run it? any help much appreciated. This (http://search.dbanotes.net/doc/mysql...#mysql-upgrade) is a little enlightening but apparently I need to have the server running to execute something that is stopping the server from running - argggg!!!

    Can anyone advise how to resolve this? Any help much appreciated.

    a+
    gar

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Garrett View Post
    where is it and how do I run it?
    mysql_upgrade is a shell script that lives in the scripts directory of your mysql installation.
    Quote Originally Posted by Garrett View Post
    ...but apparently I need to have the server running to execute something that is stopping the server from running
    this is incorrect. the shell script upgrades your myisam tables to the newest form and does not require the server to be running.

  3. #3
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    mysql_upgrade is a shell script that lives in the scripts directory of your mysql installation.

    this is incorrect. the shell script upgrades your myisam tables to the newest form and does not require the server to be running.
    so I type:

    cd /usr/local/mysql/scripts

    in terminal and then just:

    mysql_upgrade

    or is there a command to run it? Thanks for your help, much appreciated.

    Edit:

    just noticed that mysql_upgrade does not seem to be in the scripts folder it only contains mysql_install_db???


    a+
    gar
    Last edited by Garrett; Sep 13, 2007 at 10:33.

  4. #4
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Mysql still refuses to start up, I've done a clean install following braintrino's instructions (here: http://dev.mysql.com/doc/refman/5.1/...tallation.html) as I had a previous version of mysql. this is the error message I get when i sudo /Library/StartupItems/MySQLCOM/MySQLCOM start:

    Code:
    070914 11:31:04 mysqld_safe Logging to '/usr/local/mysql/data/garrett-g5-2.local.err'.
    ./bin/mysqld_safe: line 366: [: -eq: unary operator expected
    070914 11:31:05 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
    070914 11:31:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/garrett-g5-2.local.pid ended
    and this is the info in the garrett-g5-2.local.err file

    Code:
    070914 11:31:05 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
    /usr/local/mysql/bin/mysqld: Unknown error 1146
    070914 11:31:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    070914 11:31:05  InnoDB: Started; log sequence number 0 46409
    070914 11:31:05 [ERROR] Aborting
    
    070914 11:31:05  InnoDB: Starting shutdown...
    070914 11:31:07  InnoDB: Shutdown completed; log sequence number 0 46409
    070914 11:31:07 [Note] 
    070914 11:31:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/garrett-g5-2.local.pid ended
    no idea what an error 1146 is and I can't find mysql_upgrade it's not in the scripts directory. please help I'm tearing my hair out here and I've lost half a week on this now.

    a+
    gar

  5. #5
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    which package did you download?

  6. #6
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    which package did you download?

    Mac OS X 10.4 (PowerPC, 32-bit), 5.1.21-beta
    and I'm installing on on Mac OS 10.4.10 PowerPC.

    a+
    gar

  7. #7
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    try running the mysql_install_db script. that should create the plugin table.

  8. #8
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    try running the mysql_install_db script. that should create the plugin table.
    I just type mysql_install_db in terminal and hit return right? I get this:

    -bash: mysql_install_db: command not found

    a+
    gar

  9. #9
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    a little bit of *nix 101 is in order here: you can't execute programs in the local directory directly. the shell only looks in your PATH for programs to execute. to run a prgraom from the current directory, you have to type ./ first, so you in this case you need to type ./mysql_install_db

  10. #10
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    a little bit of *nix 101 is in order here: you can't execute programs in the local directory directly. the shell only looks in your PATH for programs to execute. to run a prgraom from the current directory, you have to type ./ first, so you in this case you need to type ./mysql_install_db
    now I get:

    FATAL ERROR: Could not find ./bin/my_print_defaults

    If you are using a binary release, you must run this script from
    within the directory the archive extracted into. If you compiled
    MySQL yourself you must run 'make install' first or use
    use --source-install --install-dir=xxx from the top source directory
    garrett-g5-2:/usr/local/mysql/scripts garrett$

    there is no my_print_defaults within the bin directory of mysql, obviously there needs to be but I've not deleted anything???

  11. #11
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i'm not sure what else to try. i don't have a mac that i can test on.

  12. #12
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    i'm not sure what else to try. i don't have a mac that i can test on.
    ok suggestions and ideas appreciated anyway.

    a+
    gar

  13. #13
    SitePoint Addict Garrett's Avatar
    Join Date
    Feb 2001
    Location
    England
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    resolved this now. all I can say is that the mysql Mac OS X 10.4 (PowerPC, 32-bit) 5.1.21-beta package on the mysql site is pure evil, I'm sure some Mac users have got it up and running out there but if you are currently running one of Marc Liyanage's version 4 distributions and upgrading to one of the official mysql version 5+ (as Marc no longer does packages for mysql) stay clear of version 5.1.21 and go for the version 5.0.45 option, that is:

    Mac OS X 10.4 (PowerPC, 32-bit) 5.0.45

    version 5.1.21 does loads of things wrong as far as I can see, it does not install a mysql.sock, mysql_install_db does not seem to work and these are only the issues I could find.

    a+
    gar


Bookmarks

Posting Permissions

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