OT: Getting SpamAssassin's MySQL database created - RHEL V 3.0

Frank C. Brants rhl-list at BRANTS.COM
Mon Aug 30 09:27:22 IST 2004


<x-flowed>
Please accept my apologies for this OT post...

I've searched high & low (for hours now) and I'm getting a more than a
little frazzed over what is surely a trivial issue.

I've never used MySQL before, but I would like to use it for Bayes and AWL
data, so DB Admins, please cover your eyes...

I'm running a fresh install of RHEL V. 3.0 with the following MySQL bits
installed...

[root at scan sql]# rpm -qa | grep -i mysql
php-mysql-4.3.2-11.ent
mysql-bench-3.23.58-1
mod_auth_mysql-20030510-1.ent
MySQL-python-0.9.1-6
perl-DBD-MySQL-2.1021-3
libdbi-dbd-mysql-0.6.5-5
qt-MySQL-3.1.2-13
mysql-server-3.23.58-1
mysql-3.23.58-1
mysql-devel-3.23.58-1

I'm following the Mail-SpamAssassin-3.0.0/sql/README...

"Creating A Database
-------------------

Here's the command to create a MySQL database, and user/password pair to access
it:

mysql -h <hostname> -u <adminusername> -p
Enter password: <adminpassword>
mysql> use mysql;
mysql> insert into user (Host, User, Password)
values('localhost','<username>', password('<pass
word>'));
mysql> insert into db (Host, Db, User, Select_priv)
values('localhost','<databasename>','<usern
ame>','Y');
mysql> create database <databasename>;
mysql> quit

NOTE: If you intend to use this database for Bayes and/or AWL data you
may need to grant additional privs (ie Insert_priv, Update_priv and
Delete_priv).  Please refer to the MySQL documentation for the proper
method of adding these privs.

...but when I try it...

[root at scan sql]# mysql -v -v -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23 to server version: 3.23.58

Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> insert into user (Host, User, Password)
values('localhost','My_Real_Username',' password('My_Real_Password'));
     '> insert into db (Host, Db, User, Select_priv, Insert_priv,
Update_priv, Delete_priv)
values('localhost','spamassassin','spam','Y','Y','Y','Y');
     '> create database spamassassin;
     '> quit;
     '>
     '> quit;
(At this point, any additional commands (go;, ego;, \g; \G;) just give me a
new > line - all I can do is <CTRL> C to get out, which gives me...)
     '> Writing history-file /root/.mysql_history
Aborted
[root at scan sql]#

I know I'm close, I just can figure out what I'm doing wrong.

Anybody care to shed some light, I'm flying blind :)

Thanks!!

Franko

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
</x-flowed>



More information about the MailScanner mailing list