Hey all, if i launch mysql5 that way : $ sudo /opt/local/lib/mysql5/bin/mysqld_safe & i get : [1] 26609 ~%> Starting mysqld daemon with databases from /opt/local/var/db/mysql5 STOPPING server from pid file /opt/local/var/db/mysql5/www.une-bevue.fr.pid 070425 22:57:29 mysqld ended -----------------************ [1] + done sudo /opt/local/lib/mysql5/bin/mysqld_safe then the daemon is launched and ends afterwards. the file perms are : ~/Sites%> ls -al /opt/local/lib/mysql5/bin <snip /> -rwxr-xr-x 2 root admin 1226368 Apr 23 20:33 my_print_defaults is root:admin correct or does i have to create a group:owner mysql:mysql and change it accordingly ??? best, Yvon
On Apr 25, 2007, at 18:47, Thoraval Yvon wrote:
if i launch mysql5 that way :
$ sudo /opt/local/lib/mysql5/bin/mysqld_safe &
You don't say what OS you're using, but if you're using Mac OS X 10.4 or later, the recommended way to start mysqld now, and at every system startup from now on, is: sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist The recommended way to stop mysqld now, and prevent it from starting up automatically, is: sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist If you're using Mac OS X 10.3 or earlier, then a startup item is provided for you. All of the above assumes you have installed the mysql5 port with the +server variant. If you did not do that, you should uninstall mysql5 and reinstall it with that variant.
i get :
[1] 26609 ~%> Starting mysqld daemon with databases from /opt/local/var/db/ mysql5 STOPPING server from pid file /opt/local/var/db/mysql5/www.une- bevue.fr.pid 070425 22:57:29 mysqld ended -----------------************
[1] + done sudo /opt/local/lib/mysql5/bin/mysqld_safe
then the daemon is launched and ends afterwards.
Have you checked the logfile to see what the problem is? The MySQL logs are usually pretty helpful. I believe they are stored by default in the same directory as the PID file, /opt/local/var/db/mysql5.
the file perms are :
~/Sites%> ls -al /opt/local/lib/mysql5/bin <snip /> -rwxr-xr-x 2 root admin 1226368 Apr 23 20:33 my_print_defaults
is root:admin correct
or does i have to create a group:owner mysql:mysql and change it accordingly ???
These are just the binaries. root:admin is perfectly normal and fine for these files. The directory /opt/local/var/db/mysql5 and its contents, however, should be owned by mysql:mysql. You do not need to create this user/ group; Mac OS X already ships with these users. As far as I remember, the directory is also already set to that user/group, but you could double-check it if you like.
On Thu, 26 Apr 2007 03:59:56 -0500 Ryan Schmidt <ryandesign@macports.org> wrote:
You don't say what OS you're using, but if you're using Mac OS X 10.4 or later, the recommended way to start mysqld now, and at every system startup from now on, is:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
The recommended way to stop mysqld now, and prevent it from starting up automatically, is:
sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist
I'm using 10.4.9, MacPorts didn't install org.macports.mysql5.plist : $ ls -al /Library/LaunchDaemons lrwxr-xr-x 1 root wheel 76 Apr 5 23:34 org.macports.OpenSSH.plist -> /opt/local/etc/LaunchDaemons/org.macports.OpenSSH/org.macports.OpenSSH.plist lrwxr-xr-x 1 root wheel 76 Apr 23 19:52 org.macports.apache2.plist -> /opt/local/etc/LaunchDaemons/org.macports.apache2/org.macports.apache2.plist BUT in order to start mysql server from SHELL i had to change some perms : $ sudo chown -R mysql /opt/local/var/db/mysql5 following an error message (in /opt/local/var/db/mysql5/www.une-bevue.fr.err) : 070426 09:53:13 mysqld started 070426 9:53:13 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive 070426 9:53:14 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: 'create'. InnoDB: Cannot continue operation. 070426 09:53:14 mysqld ended RIGHT NOW i'm able to connect to mysql server from SHELL or Aqua DataBase Studio. ********************************************************************************* HOWEVER a : $ locate org.macports.mysql5.plist founds NOTHING ??? something is missing after my "sudo port install php5 +apache2 +mysql5" best, Yvon
On Apr 26, 2007, at 04:12, Thoraval Yvon wrote:
On Thu, 26 Apr 2007 03:59:56 -0500, Ryan Schmidt wrote:
You don't say what OS you're using, but if you're using Mac OS X 10.4 or later, the recommended way to start mysqld now, and at every system startup from now on, is:
sudo launchctl load -w /Library/LaunchDaemons/ org.macports.mysql5.plist
The recommended way to stop mysqld now, and prevent it from starting up automatically, is:
sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist
I'm using 10.4.9, MacPorts didn't install org.macports.mysql5.plist :
$ ls -al /Library/LaunchDaemons lrwxr-xr-x 1 root wheel 76 Apr 5 23:34 org.macports.OpenSSH.plist -> /opt/local/etc/LaunchDaemons/ org.macports.OpenSSH/org.macports.OpenSSH.plist lrwxr-xr-x 1 root wheel 76 Apr 23 19:52 org.macports.apache2.plist -> /opt/local/etc/LaunchDaemons/ org.macports.apache2/org.macports.apache2.plist
BUT in order to start mysql server from SHELL i had to change some perms :
$ sudo chown -R mysql /opt/local/var/db/mysql5
following an error message (in /opt/local/var/db/mysql5/www.une- bevue.fr.err) :
070426 09:53:13 mysqld started 070426 9:53:13 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive 070426 9:53:14 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: 'create'. InnoDB: Cannot continue operation. 070426 09:53:14 mysqld ended
RIGHT NOW i'm able to connect to mysql server from SHELL or Aqua DataBase Studio. ********************************************************************** ***********
HOWEVER a :
$ locate org.macports.mysql5.plist
founds NOTHING ???
something is missing after my "sudo port install php5 +apache2 +mysql5"
You deleted the part of my message which contains the answer to your question:
All of the above assumes you have installed the mysql5 port with the +server variant. If you did not do that, you should uninstall mysql5 and reinstall it with that variant.
The org.macports.mysql5 plist is only created if you request the +server variant when you install mysql5. If you did not already have mysql5 installed, then installing php5 +mysql5 would have installed mysql5 for you with no variants selected. If you had installed the +server variant, I believe the db directory permissions would also have been set correctly for you.
On Thu, 26 Apr 2007 04:59:27 -0500 Ryan Schmidt <ryandesign@macports.org> wrote:
You deleted the part of my message which contains the answer to your question:
All of the above assumes you have installed the mysql5 port with the +server variant. If you did not do that, you should uninstall mysql5 and reinstall it with that variant.
The org.macports.mysql5 plist is only created if you request the +server variant when you install mysql5. If you did not already have mysql5 installed, then installing php5 +mysql5 would have installed mysql5 for you with no variants selected.
If you had installed the +server variant, I believe the db directory permissions would also have been set correctly for you.
OK thanks, i see the prob ! best, Yvon
On Thu, 26 Apr 2007 04:59:27 -0500 Ryan Schmidt <ryandesign@macports.org> wrote:
The org.macports.mysql5 plist is only created if you request the +server variant when you install mysql5. If you did not already have mysql5 installed, then installing php5 +mysql5 would have installed mysql5 for you with no variants selected.
OK fine, in fact i had to uninstall "everything" : Apache 2, php5 and mysql5. then reinstall the latest with : $ sudo port install php5 +apache2 +mysql5 +server then everything went as you've said. thanks a lot ! Yvon
participants (2)
-
Ryan Schmidt
-
Thoraval Yvon