Fwd: MySql5 install on SnowLeopard, problems starting
Samuel V Green III
macunkie at gmail.com
Sun Oct 10 19:20:03 PDT 2010
sudo /opt/local/share/mysql5/mysql/mysql.server start
Finally works !
Thank you
Begin forwarded message:
> From: Samuel V Green III <macunkie at gmail.com>
> Date: October 10, 2010 7:17:27 PM PDT
> To: Ryan Schmidt <ryandesign at macports.org>
> Subject: Re: MySql5 install on SnowLeopard, problems starting
>
> Just installed via : sudo port install mysql5-server
>
> Then I issued following command :
>
> sudo -u _mysql mysql_install_db5
>
> GOT THE FOLLOWING OUTPUT:
>
> shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> Installing MySQL system tables...
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> OK
> Filling help tables...
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> OK
>
>
>
> On Oct 10, 2010, at 7:09 PM, Ryan Schmidt wrote:
>
>> On Oct 10, 2010, at 20:22, Samuel V Green III wrote:
>>
>>> Hoping there is someone out there who has successfully got MySql 5.1.51 running on 10.6.1 ?
>>>
>>> MySQL 5 Install MacPorts:
>>>
>>> sudo port install mysql5 +server
>>
>> As Bradley already pointed out, the mysql5 port has no variant called "server"; you want the separate mysql5-server port.
>>
>>
>>> From here I couldn't get the databases initialized with this command:
>>> sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
>>
>> Why not? what happened?
>>
>>
>>> Then I tried this:
>>>
>>> sudo -u mysql mysql_install_db5
>>>
>>> Still no luck
>>
>> Why not? what happened?
>>
>> Note that on Leopard and later, the user is technically _mysql (not mysql).
>>
>>
>>> and finally this seemed to work:
>>>
>>> sudo mysql_install_db5
>>>
>>> Producing :
>>>
>>> Installing MySQL system tables...
>>> OK
>>> Filling help tables...
>>> OK
>>>
>>> "To start mysqld at boot time you have to copy
>>> support-files/mysql.server to the right place for your system
>>>
>>> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
>>> To do so, start the server, then issue the following commands:
>>>
>>> /opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
>>> /opt/local/lib/mysql5/bin/mysqladmin -u root -h myserver.local password 'new-password'
>>>
>>> Alternatively you can run:
>>> /opt/local/lib/mysql5/bin/mysql_secure_installation
>>>
>>> which will also give you the option of removing the test
>>> databases and anonymous user created by default. This is
>>> strongly recommended for production servers.
>>>
>>> See the manual for more instructions.
>>>
>>> You can start the MySQL daemon with:
>>> cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &
>>>
>>> You can test the MySQL daemon with mysql-test-run.pl
>>> cd /opt/local/mysql-test ; perl mysql-test-run.pl"
>>
>> Well, ok, but now the database files created are owned by root, which isn't right. They need to be owned by _mysql.
>>
>>
>>> ATTEMPTING TO START WITH THIS:
>>>
>>> sudo /opt/local/share/mysql5/mysql/mysql.server start
>>> Password:
>>> Starting MySQL
>>>
>>> ...... ERROR! Manager of pid-file quit without updating file.
>>>
>>>
>>> Don't quite know if my permissions are correct of the
>>> /opt/local/var/db/mysql5 directory ?
>>>
>>> Current Permissions:
>>>
>>> drwx------ 8 _mysql _mysql 272 Oct 10 18:15 mysql5
>>
>> Those permissions might be ok... on my development system they're 755 instead of 700 but if everything is running as the _mysql user that shouldn't matter.
>>
>>
>> Have you already referred to the MAMP how-to in our wiki?
>>
>> http://trac.macports.org/wiki/howto/MAMP
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101010/f5b098b9/attachment.html>
More information about the macports-users
mailing list