Could not find my_print_defaults

David Gentry localbusinesswebsites at earthlink.net
Mon Mar 7 13:26:39 PST 2011


Ryan,

1. I tried specifying a basedir as you suggested to no avail.  Adding /bin to /opt/local/lib/mysql5 helped but not much.  Then I tried sudo mysql_install_db5 --srcdir=/opt/local/lib/mysql5/bin, and I received an error message telling me exactly where mysql_install_db5 was looking for my_print_defaults which was /opt/local/lib/mysql5/bin/extra.  I added /extra as a folder to /opt/local/lib/mysql5/bin, and I moved my_print_defaults to that folder.  Then I got another error message saying another file was in the wrong place, so I moved it.  I moved about 5-8 files from various places, but all of them to /opt/local/lib/mysql5/bin.  Sometimes I had to create a folder in /bin to move a file to.

2. Then I ran the same command as in all of the instances above: sudo mysql_install_db5 --srcdir=/opt/local/lib/mysql5/bin, and I received the following:

Installing MySQL system tables...
110307 14:31:22 [Warning] '--log' is deprecated and will be removed in a future release. Please use ''--general_log'/'--general_log_file'' instead.
110307 14:31:22 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110307 14:31:22 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:31:22 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:31:22 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:31:22 [ERROR] /opt/local/lib/mysql5/bin/sql/mysqld: unknown option '--enable-named-pipe'
110307 14:31:22 [ERROR] Aborting

110307 14:31:22 [Note] /opt/local/lib/mysql5/bin/sql/mysqld: Shutdown complete

Installation of system tables failed!  Examine the logs in
/opt/local/var/db/mysql5 for more information.

You can try to start the mysqld daemon with:

    shell> /opt/local/lib/mysql5/bin/sql/mysqld --skip-grant &

and use the command line tool /opt/local/lib/mysql5/bin/client/mysql
to connect to the mysql database and look at the grant tables:

    shell> /opt/local/lib/mysql5/bin/client/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /opt/local/var/db/mysql5 that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /opt/local/lib/mysql5/bin/scripts/mysqlbug script!

3. I looked for the logs and there were two empty files there.

4. I wanted to read mysqld, so I ran: /opt/local/lib/mysql5/bin/sql/mysqld ; exit;

I received:

110307 14:14:25 [Warning] '--log' is deprecated and will be removed in a future release. Please use ''--general_log'/'--general_log_file'' instead.
110307 14:14:25 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110307 14:14:25 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:14:25 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:14:25 [Warning] /opt/local/lib/mysql5/bin/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
110307 14:14:25 [ERROR] Can't find messagefile '/usr/local/mysql-5.5.6-rc-osx10.6-x86_64/share/mysql5/mysql/__PREFIX/share/mysql/english/errmsg.sys'
110307 14:14:25 [Warning] Can't create test file /usr/local/mysql-5.5.6-rc-osx10.6-x86_64/data/DAVID.lower-test
110307 14:14:25 [Warning] Can't create test file /usr/local/mysql-5.5.6-rc-osx10.6-x86_64/data/DAVID.lower-test
/opt/local/lib/mysql5/bin/sql/mysqld: Can't change dir to '/usr/local/mysql-5.5.6-rc-osx10.6-x86_64/data/' (Errcode: 13)
110307 14:14:25 [ERROR] Aborting

110307 14:14:25 [Note] 
logout

[Process completed]

5. I tried to start the mysqld daemon with the suggestion and command given above: You can try to start the mysqld daemon with:

    shell> /opt/local/lib/mysql5/bin/sql/mysqld --skip-grant &

That produced a message similar to the content of mysqld above in number 4.

My conclusion: Maybe I can get mysql_install_db5 running properly if I had a good mysqld file, but maybe not.  When I have tried to move files around in other programs to resolve error messages, the results have not been satisfactory.  I am thinking of submitting a MacPorts ticket saying that possibly the wiki is broken, and then I will look for another source to download MySQL from.  I subscribe to www.lynda.com, and there is a tutorial on "Installing XAMPP on a Mac."  Maybe I will try that.  I did not have good luck downloading MySQL directly from mysql.com.

Do you have advice concerning what I should do now?  I am determined to get MySQL working on my Mac unless there is another database management software program I could use.  I want to develop shopping cart websites.

I am curious to know if anyone has used successfully the wiki I am using.  Should I just send a query to the MacPorts address list?

David


On Mar 6, 2011, at 12:14 PM, Ryan Schmidt wrote:


On Mar 5, 2011, at 16:47, David Gentry wrote:

> I am using the MAMP#mysql wiki.  
> 
> I am working on "Set up the main database."  For quite some time, I could not get past "FATAL ERROR: Could not find mysql_install_db."  
> 
> This command got me past that error message: sudo mysql_install_db5 --basedir=/opt/local/bin, but it gave me the following error:
> 
> FATAL ERROR: Could not find my_print_defaults
> 
> The following directories were searched:
> 
>   /opt/local/bin/bin
>   /opt/local/bin/extra
> 
> If you compiled from source, you need to run 'make install' to
> copy the software into the correct location ready for operation.
> 
> If you are using a binary release, you must either be at the top
> level of the extracted archive, or pass the --basedir option
> pointing to that location.
> 
> Please help.
> 
> Note: my_print_defaults5 is an alias in /opt/local/bin.  Since I named the basedir as /opt/local/bin, I don't understand why the program looked in /opt/local/bin/bin.

To my knowledge, the instructions in the wiki MAMP article remain correct. Make sure you are following them correctly. But I have not tried to follow them in a long time; something may have broken.

Instead of /opt/local/bin, try specifying a basedir of /opt/local/lib/mysql5.



David J. Gentry
President
Good Things -- Small Packages, LLC
205-637-8000
dgentry at localbusinesswebsites.com
www.localbusinesswebsites.com






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110307/737f1785/attachment.html>


More information about the macports-users mailing list