You are not logged in.

#1 2008-03-05 10:56:46

satimis
Member
Registered: 2007-03-03
Posts: 186

Problem on setup MySQL

Hi folks,


I followed
http://wiki.archlinux.org/index.php/SOH … stallation


and encountered problem on Postfix Admin.

Load Postfix Admin MySQL database structure.

$ su
# mysql -uroot -p < /home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT

Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

$ cat /home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT | grep 'INSERT INTO'

INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password('pfadmin2008'));
INSERT INTO db (Host, Db, User, Select_priv) VALUES ('localhost','postfix','postfix','Y');
INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password('pfadmin2008'));
INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('localhost', 'po
stfix', 'postfixadmin', 'Y', 'Y', 'Y', 'Y');

Tried to fix the problem with following steps w/o result.

$ hostname
arch.satimis.com


$ cat /etc/rc.conf | grep HOSTNAME

HOSTNAME="arch.satimis.com"

$ cat /etc/hosts

# /etc/hosts: static lookup table for host names

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1      localhost
192.168.0.52    arch.satimis.com

Edit /etc/hosts as;

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost       arch.satimis.com
#127.0.0.1      localhost
192.168.0.52    arch.satimis.com

$ sudo mysql_install_db

Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h arch.satimis.com password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

$ su
#  mysql -uroot -p < /home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT

Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Problem still remains.  Please advise.  TIA



side problem;

On running following steps;

$ cd /home/httpd/html/postfixadmin/images/
$ sudo chmod 640 *.gif *.png

chmod: cannot access `*.gif': No such file or directory

$ ls -al

total 52
drwxr-xr-x 2 nobody nobody 4096 2005-01-07 07:00 .
drwxr-xr-x 9 nobody nobody 4096 2005-01-07 06:56 ..
-rw-r----- 1 nobody nobody  363 2005-01-07 07:00 arrow-l.png
-rw-r----- 1 nobody nobody  407 2005-01-07 07:00 arrow-r.png
-rw-r----- 1 nobody nobody  365 2005-01-07 07:00 arrow-u.png
-rw-r--r-- 1 nobody nobody  188 2005-01-07 07:00 index.php
-rw-r----- 1 nobody nobody 4361 2005-01-07 07:00 postbox.png
-rw-r----- 1 nobody nobody 6052 2005-01-07 07:00 postfixadmin.png
-rw-r----- 1 nobody nobody 1949 2005-01-07 07:00 postfixadmin2.png
-rw-r--r-- 1 nobody nobody 4764 2005-01-07 07:00 postfixadmin2.xcf

No .gif file there.



B.R.
satimis

Offline

#2 2008-03-05 12:30:40

quad3d@work
Member
From: Austin, TX
Registered: 2006-12-29
Posts: 81
Website

Re: Problem on setup MySQL

Alternatively you can run:
/usr/bin/mysql_secure_installation

Did you run that? By default MySQL server installation have an empty pw for root login... and at beginning of the tutorial I stated expecting that Apache and MySQL are already installed and configured.

chmod: cannot access `*.gif': No such file or directory

You can ignore the above... that chmod was listed from Postfixadmin's installation notes and I think they used to have gif files.

Offline

#3 2008-03-05 13:57:25

satimis
Member
Registered: 2007-03-03
Posts: 186

Re: Problem on setup MySQL

quad3d@work wrote:
Alternatively you can run:
/usr/bin/mysql_secure_installation

Did you run that? By default MySQL server installation have an empty pw for root login... and at beginning of the tutorial I stated expecting that Apache and MySQL are already installed and configured.

Just tried.

$ sudo /etc/rc.d/mysqld start

Password: 
:: Starting MySQL                                                                       [DONE]

$ su
Password:
#  /usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):

Disregarding whether hit [Enter] OR type "pfadmin2008" still failed.


chmod: cannot access `*.gif': No such file or directory

You can ignore the above... that chmod was listed from Postfixadmin's installation notes and I think they used to have gif files.

Noted with thanks


B..R
satimis

Offline

Board footer

Powered by FluxBB