ERROR: 1004 Can't create file '/var/tmp/#sqlcf9_1_0.frm' (errno: 9)

Sebastian Wojtowicz trust.sebastian at googlemail.com
Sun Dec 5 09:48:58 PST 2010


It seems to work now, I deleted /opt/local/var/db/mysql5/mysql and ran
sudo -u mysql mysql_install_db5
and after some other things I typed (tried mysql_secure_installation which
failed cause of wrong socket or so)
mysqladmin5 -u root -p password asd
suddenly worked

2010/12/5 Sebastian Wojtowicz <trust.sebastian at googlemail.com>

> 2010/12/5 Ryan Schmidt <ryandesign at macports.org>
>
>>
>> On Dec 5, 2010, at 09:57, Sebastian Wojtowicz wrote:
>>
>> > I cleaned my disk and reinstalled Mac OSX. Followed by the following
>> actions.
>> > Why isn't this working ? Is the mysql port defect ?
>>
>> It works fine for me, though I haven't tried following the initial setup
>> instructions in years; I set up my MySQL server long ago and it just keeps
>> working.
>>
>> It worked for me fine for 2 years, too. But yesterday I got convinced to
> reinstall my OS
>
>>
>> > * sudo port install mysql5 +server
>>
>> The mysql5 port does not have a variant called +server. (Check "port
>> variants mysql5".) It did, years ago, but this was changed to a separate
>> port called mysql5-server, so you should install that. mysql5-server should
>> set up directories, users and permissions properly.
>>
>> OK, tried -server too
>
>>
>> > * sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
>> > Password:
>> > Installing MySQL system tables...
>> > ERROR: 1004  Can't create file '/var/tmp/#sqla0_1_0.frm' (errno: 9)
>> > 101205 16:04:06 [ERROR] Aborting
>> >
>> > 101205 16:04:06 [Note] /opt/local/libexec/mysqld: Shutdown complete
>> > [...and more text...]
>> > * sudo /opt/local/lib/mysql5/bin/mysqld_safe &
>> > [1] 260
>> > Sebastian-Wojtowiczs-MacBook:~ Allisone$ 101205 16:12:36 mysqld_safe
>> Logging to
>> '/opt/local/var/db/mysql5/Sebastian-Wojtowiczs-MacBook.local.err'.
>> > mkdir: /opt/local/var/run: No such file or directory
>> > chown: /opt/local/var/run/mysql5: No such file or directory
>> > chmod: /opt/local/var/run/mysql5: No such file or directory
>> > 101205 16:12:36 mysqld_safe Starting mysqld daemon with databases from
>> /opt/local/var/db/mysql5
>> > 101205 16:12:42 mysqld_safe mysqld from pid file
>> /opt/local/var/db/mysql5/Sebastian-Wojtowiczs-MacBook.local.pid ended
>> >
>> > * sudo mkdir /opt/local/var/run
>> > * sudo chmod g+w /opt/local/var/run
>> > * sudo mkdir /opt/local/var/run/mysql5
>> > * sudo chown mysql /opt/local/var/run/mysql5
>> > * mysqladmin5 -u root -p ping
>> > Enter password:
>> > mysqladmin5: connect to server at 'localhost' failed
>> > error: 'Access denied for user 'root'@'localhost' (using password: NO)'
>> > * /opt/local/lib/mysql5/bin/mysqladmin -u root password 'mypass'
>> > /opt/local/lib/mysql5/bin/mysqladmin: connect to server at 'localhost'
>> failed
>> > error: 'Access denied for user 'root'@'localhost' (using password: NO)'
>> >
>> > * sudo chown -R mysql:mysql /opt/local/var/db/mysql5
>> > * sudo chmod u+rwx,go= /opt/local/var/db/mysql5
>>
>> The above is some of what the mysql5-server port would have set up for
>> you. (That is, it creates the directories and sets their ownership and
>> permissions; I haven't verified that the ownership and permissions the
>> mysql5-server port sets them to is identical to what you've used above.)
>>
>>
>> > * sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
>> > Installing MySQL system tables...
>> > OK
>> > Filling help tables...
>> > OK
>> > [...and more text...]
>> > * mysqladmin5 -u root password
>> > mysqladmin5: connect to server at 'localhost' failed
>> > error: 'Access denied for user 'root'@'localhost' (using password: NO)'
>>
>> This makes it sound like the root user already has a password, or the
>> permission tables didn't get loaded properly by mysql_install_db. I'm not
>> certain how to debug this further.
>>
>>
>> You know, we do have a MySQL how-to in our wiki... have you tried
>> following that?
>>
>> http://trac.macports.org/wiki/howto/MAMP#mysql
>>
>>
>>
> Thx, I didn't know http://trac.macports.org/wiki/howto/MAMP#mysql
> I did
> sudo port uninstall mysql5
> sudo port install mysql5-server and followed the instructions from that
> page but at
> mysqladmin5 -u root -p password <new-password>
>
> I'm stuck again...
>
> Sebastian-Wojtowiczs-MacBook:~ Allisone$ mysqladmin5 -u root -p password
> 'secret'
> Enter password:
> mysqladmin5: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password: YES)'
>
> I'm really getting crazy here.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101205/57174446/attachment.html>


More information about the macports-users mailing list