RE: How does one start mysql after installing from ports

2007-07-05 Thread Johan Hendriks


>To autostart mysql at boot add this to /etc/rc.conf
>mysql_enable="YES"

>Add this to /etc/rc.conf to direct to use location where there is a large
>enough free disk space
>to hold your databases
>mysql_dbdir="/usr/local/mysql"

>To start or stop mysql server do this
>/usr/local/share/mysql/mysql.server start
>/usr/local/share/mysql/mysql.server stop

Better is to use /usr/local/etc/rc.d/mysql start cq stop

>You have to tell mysql to create its internel control db
>by running this command one time first before trying to create databases.
>mysql_install_db --user=mysql

If you did use /usr/local/etc/rc.d/mysql start, the above is not needed, it 
will do it automaticly if it does not find any database at startup.

>To verify mysql is operational issue these commands
>mysqladmin version
>mysqladmin variables

>To start command line session with mysql server to
>create a DB enter
>mysql -u root

>The online mysql manual is at
>http://dev.mysql.com/doc/refman/5.0/en/index.html

 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.0/886 - Release Date: 4-7-2007 13:40
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: How does one start mysql after installing from ports

2007-07-04 Thread Bob
To autostart mysql at boot add this to /etc/rc.conf
mysql_enable="YES"

Add this to /etc/rc.conf to direct to use location where there is a large
enough free disk space
to hold your databases
mysql_dbdir="/usr/local/mysql"

To start or stop mysql server do this
/usr/local/share/mysql/mysql.server start
/usr/local/share/mysql/mysql.server stop

You have to tell mysql to create its internel control db
by running this command one time first before trying to create databases.
mysql_install_db --user=mysql

To verify mysql is operational issue these commands
mysqladmin version
mysqladmin variables

To start command line session with mysql server to
create a DB enter
mysql -u root

The online mysql manual is at
http://dev.mysql.com/doc/refman/5.0/en/index.html



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How does one start mysql after installing from ports

2007-07-04 Thread Paul Schmehl
--On July 4, 2007 4:00:48 PM -0600 Andrew Falanga <[EMAIL PROTECTED]> 
wrote:



This is pretty pathetic but I'm batting a 1000 on this one.  I
installed mysql a few weeks ago on this web server I'm making for my
church and didn't do anything with it at that point (that was the
first mistake).  I've not used mysql (I usually use PostgreSQL) but
WebGUI wants mysql.  So, being completely unfamiliar with it, I cannot
figure out how to start this thing.

I eventually figured out that the mysqld process starts by using
mysqld_safe in /usr/local/bin.  However, I can't get it to start.  At
first it was because the directory /var/db/mysql didn't exist.  I
created that and now I get this:

All ports that run daemons should put a startup script in 
/usr/local/etc/rc.d.  Mysqld does.  Look at that script and it will 
explain what you need to do to start mysql.  The port maintainer has 
written the script so that it should start mysqld properly.


Basically, you add mysqld_enable="YES" to the /etc/rc.conf file, but look 
at the script and read the comments in it.


Paul Schmehl ([EMAIL PROTECTED])
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


Re: How does one start mysql after installing from ports

2007-07-04 Thread Gerard
On July 04, 2007 at 06:00PM Andrew Falanga wrote:


> This is pretty pathetic but I'm batting a 1000 on this one.  I
> installed mysql a few weeks ago on this web server I'm making for my
> church and didn't do anything with it at that point (that was the
> first mistake).  I've not used mysql (I usually use PostgreSQL) but
> WebGUI wants mysql.  So, being completely unfamiliar with it, I cannot
> figure out how to start this thing.
> 
> I eventually figured out that the mysqld process starts by using
> mysqld_safe in /usr/local/bin.  However, I can't get it to start.  At
> first it was because the directory /var/db/mysql didn't exist.  I
> created that and now I get this:
> 
> whitbap# mysqld_safe
> Starting mysqld daemon with databases from /var/db/mysql
> STOPPING server from pid file /var/db/mysql/whitbap.pid
> 070704 16:09:42  mysqld ended
> 
> (And the contents of /var/db/mysql/whitbap.err:
> whitbap# cat /var/db/mysql/whitbap.err
> 070704 16:02:41  mysqld started
> 070704 16:02:42  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.
> 070704 16:02:42  mysqld ended
> 
> 070704 16:09:42  mysqld started
> 070704 16:09:42  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.
> 070704 16:09:42  mysqld ended
> 
> 
> I'm assuming that a process, perhaps similar to PostgreSQL, is
> applicable for MySQL too.  For example, in PostgreSQL, one must first
> usr 'initdb' to initialize the data area.  Is this true for MySQL too?
> 
> Please tell me how to work MySQL (to anyone on this list that uses it).
> 
> Thanks,
> Andy

Unless I am misreading this, the correct method is by inserting the
following into the '/etc/rc.conf' file:

mysql_enable="YES"

You can then either reboot the system to start the program, perhaps a
good idea to make sure it does get initialized correctly, or else as
root type:

/usr/local/etc/rc.d/mysql-server start

That should complete the process. If you receive error messages when
mysql starts up, shut it down using the 'stop' flag in place of 'start'
and then move the '/var/db/mysql' directory out of the way and restart
mysql.

-- 
Gerard
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How does one start mysql after installing from ports

2007-07-04 Thread Andrew Falanga

This is pretty pathetic but I'm batting a 1000 on this one.  I
installed mysql a few weeks ago on this web server I'm making for my
church and didn't do anything with it at that point (that was the
first mistake).  I've not used mysql (I usually use PostgreSQL) but
WebGUI wants mysql.  So, being completely unfamiliar with it, I cannot
figure out how to start this thing.

I eventually figured out that the mysqld process starts by using
mysqld_safe in /usr/local/bin.  However, I can't get it to start.  At
first it was because the directory /var/db/mysql didn't exist.  I
created that and now I get this:

whitbap# mysqld_safe
Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/whitbap.pid
070704 16:09:42  mysqld ended

(And the contents of /var/db/mysql/whitbap.err:
whitbap# cat /var/db/mysql/whitbap.err
070704 16:02:41  mysqld started
070704 16:02:42  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.
070704 16:02:42  mysqld ended

070704 16:09:42  mysqld started
070704 16:09:42  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.
070704 16:09:42  mysqld ended


I'm assuming that a process, perhaps similar to PostgreSQL, is
applicable for MySQL too.  For example, in PostgreSQL, one must first
usr 'initdb' to initialize the data area.  Is this true for MySQL too?

Please tell me how to work MySQL (to anyone on this list that uses it).

Thanks,
Andy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"