not appear domain and users email

Started by royer_guerra@hotmail.com, February 22, 2019, 08:28:44 PM

Previous topic - Next topic

royer_guerra@hotmail.com

someone know why not appear the domain and users email in the user CWP7? 
said

No data available in table

regards

royer_guerra@hotmail.com

#1
I did that and appears.

[root@cwp ~]# sh /scripts/cwpsrv_rebuild_user_conf
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
[root@cwp ~]#

[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT username FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)



Some idea to resolve this issue?  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N

Regards

Netino

Check your MySQL root password are exactly the same in files:
   /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
   /root/.my.cnf

Regards,
Netino

royer_guerra@hotmail.com

Thanks Netino, Yea is the same password.

Modify the file /scripts/cwpsrv_rebuild_user_conf

exactly this line

mysql -u root -p#password#  root_cwp -B -N -s -e "SELECT username FROM user" | while read -r username
#mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT username FROM user" | while read -r username

and run the
#sh /scripts/cwpsrv_rebuild_user_conf

With this fix can see the emails account and add acounts to each one customer but the domains still didnt appear.

Any suggestion

Regards
Roger



Netino

This loop is not dealing with 'domains', just only with 'user' field, to make nginx deal with 'location' of that user.

But try to execute the command, and check if your configuration is ok:

# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"


(note I changed to '*' in the command)

royer_guerra@hotmail.com

here is the output.

[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

whadmin

Same issue ie. no domains when checking email routing etc. I checked in the DB and it's blank ie. no records.

The command: mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"

Outputs the correct data for the 2 accounts I created, so I don't think it's an access issue. Those records were never created when the user account was created:


Netino

#7
Quote from: royer_guerra@hotmail.com on February 25, 2019, 02:14:12 PM
here is the output.

[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

This worths for you:
Quote
Check your MySQL root password are exactly the same in files:
   /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
   /root/.my.cnf

If the passwords are exactly the same, so you have problems in your "/root/.my.cnf" file.

you must have something like this in that file:

[client]

password=Wr3rT9r4tO8c
user=root

(obviously, the password is ficticious, adapt it to your case)

Anyway, if it still does not work, try to access directly your mysql/mariadb server, with the command:

# mysql -p root_cwp -B -N -s -e "SELECT * FROM user"


...and provide that password directly, as it ask it. It must access. If the system complains of "Access denied" then your password is wrong, you will need to reassign it.

Netino

Quote from: whadmin on February 26, 2019, 12:12:52 AM
Same issue ie. no domains when checking email routing etc. I checked in the DB and it's blank ie. no records.

The command: mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"

Outputs the correct data for the 2 accounts I created, so I don't think it's an access issue. Those records were never created when the user account was created:

You can have problem in 'domains' table. Check if the domais are exactly the same in both tables.

royer_guerra@hotmail.com

Quote from: Netino on February 27, 2019, 03:18:16 AM
Quote from: royer_guerra@hotmail.com on February 25, 2019, 02:14:12 PM
here is the output.

[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

This worths for you:
Quote
Check your MySQL root password are exactly the same in files:
   /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
   /root/.my.cnf

If the passwords are exactly the same, so you have problems in your "/root/.my.cnf" file.

you must have something like this in that file:

[client]

password=Wr3rT9r4tO8c
user=root

(obviously, the password is ficticious, adapt it to your case)

Anyway, if it still does not work, try to access directly your mysql/mariadb server, with the command:

# mysql -p root_cwp -B -N -s -e "SELECT * FROM user"


...and provide that password directly, as it ask it. It must access. If the system complains of "Access denied" then your password is wrong, you will need to reassign it.

This sentence works fine.   # mysql -p root_cwp -B -N -s -e "SELECT * FROM user"

royer_guerra@hotmail.com

the problem was the DB password start with #.