Help - Search - Members - Calendar
Full Version: Mysql Problem
Linuxhelp > Support > Technical Support
Robert83
Hi,

when I do this
CODE
mysql> insert into
   -> user(host, user, password)
   -> values('localhost','mail',password('***********'));
ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'user(host, user, password)
values('localhost','mail',password('


what is wrong here?

Sincerely
Robert B
hughesjr
You need a space between the user and the column names ... and between values and the data....like this:

insert into user (host,user,password) values ('localhost','mail',password('***********'));
Robert83
Hi,

I'm trying to add mail, it seems to add did those 2 steps first add the user, then that database user (my new mail user) stuff, and it still won't let mail@localhost in , it says Access denied for user : mail@localhost (Using password: YES)

what did I do wrong here? (tried it several times) ... is it a problem if I use the same code for mail as root ?

Sincerely
Robert B
hughesjr
What guide are you using to install the postfix - mysql solution?

After all the programs are installed, you have to setup postfix properly ... usually in main.cf, transport.cf, vuids.cf, vgids.cf, aliases.cf, and remote_aliases.cf.
Robert83
Hi,

this guide http://www.delouw.ch/linux/Postfix-Cyrus-W...ml/install.html

it's at the botom of the page, creating databases and tables

if you can check it out please tell me , what does the author mean by this ?

After unpacking web-cyradm, move it to a place in your webserver's documentroot.


Thats all. Now you need to configure the whole bunch of software.


Web-cyradm 0.5.4 is considered stable, and was released on 2003-12-05


Since web-cyradm uses PEAR for its database abstraction layer, you also need a recent copy of PEAR. This is included in recent PHP Versions. I strongly suggest to update PHP to 4.3.4, because a lot of important bugs have been fixed.


A frequent mistake is to forget to touch the logfile and change the owner to the Apache UID. This is usually nobody or wwwrun.

Sincerely
Robert B
Robert83
Hi,

can you please tell me what is wrong with my mysql settings,

first I created root, and created the database (skipped that user, and non localhost part).

and after that I did everything ( skipped root , non localhost), I added mail


what can be wrong?

Sincerely
Robert B
hughesjr
Are you doing this on a WhiteBox machine?

I will try (today) to get a postfix install via the above guide on Whitebox EL. If I use a different guide, I will at least try to have all the functionality (SMTP, POP3, WEB Access, SASL) that is included in that guide ... BUT, I will try to use WhiteBox RPMS as much as possible (so MySQL will be 3.23.58, postfix will be 2.0.11-4 .... if possible.)

I will keep notes and try to post a guide ...
Robert83
Hi,

yes I'm doing this on a Whitebox machine,

but Johnny, if it's not to much to ask could you tell me why is mysql doing this with a mail account that I already added ?, how do I reset mysql to factory default, so that I can do everything (the mysql adding users and stuff) again?

Sincerely
Robert B
Robert83
Hi,

I managed to do it,

first

use mysql
DELETE FROM user WHERE User='mail';

then I added the user again as show at GUIDES section of this forum

and did a

FLUSH PRIVILEGES

now it's working, oh... and I think to help people from ever screwing up the system so bad as me...tell them

NEVER EVER USE THE SAME PASSWORD FOR root and mail(regular user)

and also delete
DELETE FROM user WHERE User='';

why?

because of this :

The gist is that user@host matching is done host first, then user. If
more than one host matches, the most specific wins. So, when conecting as
roby from localhost, the anonymous user ''@localhost is a better match than
roby@%, because the host part is more specific. This bites a lot of people.
Most, I think, solve this by deleting the anonymous users.

mysql -u root -p mysql
mysql> DELETE FROM user WHERE User='';
mysql> FLUSH PRIVILEGES;

Sincerely
Robert B
hughesjr
you should be able to add users to mysql ....

try running mysql like this (as root):

mysql -u root -p

It should prompt you for your root user's mysql password (or let you in if it is blank).

You then should be able to use the command (from within mysql):

show databases;

then do:

use mysql;

then do:

select user,host,password from user;

This should give you a list of all users who have mysql permissions....
----------------------EDIT----------------------
Never mind ... you already fixed it.... wink.gif

I was going to see if you had any users that needed deleting...
Robert83
Hi,

hit the wall again

$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file
--bind-address=127.0.0.1&

do you know what the command is to make /etc/init.d/mysql.server start

default to 127.0.0.1 (localhost) , and not listen on the network ?

I wan't to add it to this file, so I won't have to type it in again manualy every time

the problem is that it's a newer version... cause it's not safe_mysqld, but it's mysqld_safe , and a few things are different, none of the options on this site, or on others (I have found till now) make mysql liston to localhost only.

please help

Sincerely
Robert B
Robert83
Hi,

my fault....
all mine... don't look at me smile.gif

now it's working

just --bind-address="127.0.0.1"
and it should be put right after $bindir/mysqld_safe --bind-address="127.0.0.1" etc...etc...etc...

and now when I type netstat -an|grep LISTEN

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

Sincerely
Robert B
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.