John,

Do not want you to get frustrated!

Here are all the changes I made on my local machine (OpenBSD 3.7/sparc64, but config is the exact same on my OpenBSD 3.7/i386 machines).

I normally set everything up before installing mysql. Unless you have databases to save I would recommend starting from scratch.

# pkg_del mysql-server-4.0.23p1
# rm -rf /var/mysql
# rm -rf /var/www/mysql
# pkg_add mysql-server-4.0.23p1.tgz

contents of /etc/my.cnf (copied from /usr/local/share/my-small.cnf) is at bottom of email.

# mkdir /var/www/mysql
# chown _mysql:_mysql /var/www/mysql

# cat /etc/my.cnf
# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /var/www/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /var/www/mysql/mysql.sock

.... no other changes below this

Restart apache, be sure your php4/5-mysql packages are installed properly and you should be good to go! It need not be very complicated!

Matt



Matthew S Elmore wrote:
For your needs, you can use mostly the default settings.

Look in /usr/local/share/mysql

There will be several files called my-small.cnf, my-large.cnf, etc. Copy my-small.etc to /etc/my.cnf. Edit the file and change the two lines where it references the mysql socket.

Remove any links you made before doing this.

Regards,
Matt


John Tate wrote:

Right, I created a hardlink of the socket into
/var/www/mysql/mysql.sock and changed this directive in php.ini to the
following...

mysql.default_socket = /var/www/mysql/mysql.sock

I however could not find the my.cnf file, where is it on OpenBSD 3.6,
I did a "find / | grep my.cnf" which showed up nothing.

From phpinfo()...


MySQL Support    enabled
Active Persistent Links     0
Active Links     0
Client API version     4.0.20
MYSQL_MODULE_TYPE     external
MYSQL_SOCKET     /var/run/mysql/mysql.sock
MYSQL_INCLUDE     -I/usr/local/include/mysql
MYSQL_LIBS     -L/usr/local/lib -lmysqlclient

Directive    Local Value    Master Value
mysql.allow_persistent    On    On
mysql.connect_timeout    60    60
mysql.default_host    no value    no value
mysql.default_password    no value    no value
mysql.default_port    no value    no value
mysql.default_socket /var/www/mysql/mysql.sock /var/www/mysql/mysql.sock
mysql.default_user    no value    no value
mysql.max_links    Unlimited    Unlimited
mysql.max_persistent    Unlimited    Unlimited
mysql.trace_mode    Off    Off

Reply via email to