Monday, May 09, 2005

inital cacti errors

When I first tried to get to http://.../cacti, it said cactiuser didn't have access to the database. So I did:
mgmt# mysql -u root -p -h myFQDN
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 40 to server version: 4.1.11

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL ON cacti.* TO cactiuser IDENTIFIED BY 'cactiuser';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

Friday, May 06, 2005

FreeBSD cvsup

Found out that
*default release=cvs tag=.
is very important in the cvsup config file. Otherwise the ports aren't up to date and you have to copy everything by hand to /usr/../distfiles.

Wednesday, May 04, 2005

more mySQL

And for this error:
[root@mgmt]# /usr/libexec/mysqld --user=mysql
050504 15:09:57 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

I did:
chown -R mysql.mysql /var/lib/mysql

Seems to work...on to php.

After fighting with mySQL for quite some time, and getting an array of errors, this seems to have fixed it.
root@mgmt# /usr/libexec/mysqld --user mysql
050504 11:25:43 Can't start server : Bind on unix socket: Address already in use
050504 11:25:43 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
050504 11:25:43 Aborting

050504 11:25:43 /usr/libexec/mysqld: Shutdown Complete
This was the most persistent problem. (There were others)

I finally found something at http://dev.mysql.com/doc/mysql/en/starting-server.html that mentioned " When the mysqld server starts, it changes location to the data directory. This is where it expects to find databases and where it expects to write log files. On Unix, the server also writes the pid (process ID) file in the data directory." So that made me think about the permissions of the directory of /usr/libexec/mysqld. They were:
[root@mgmt mysql]# ll /var/lib
drwxr-xr-x 4 root mysql 4096 May 4 11:16 mysql

So mysql didn't have access to write to that directory.

So I did:
[root@mgmt mysql]# chmod 775 /var/lib/mysql/

And now mysqld starts happily:
[root@mgmt mysql]# /usr/libexec/mysqld --user mysql
/usr/libexec/mysqld: ready for connections

So what I don't know is: what does the 775 permissions hurt?